}
upsize();
- Bool place_window = True;
+ place_window = true;
if (openbox.isStartup() || flags.transient ||
client.normal_hint_flags & (PPosition|USPosition)) {
setGravityOffsets();
(signed) (frame.y + frame.y_border) >= 0 &&
frame.x <= (signed) screen->size().w() &&
frame.y <= (signed) screen->size().h()))
- place_window = False;
+ place_window = false;
}
frame.window = createToplevelWindow(frame.x, frame.y, frame.width,
XMapSubwindows(display, frame.window);
XMapWindow(display, frame.window);
+ // if we're using the click to place placement type, then immediately
+ // after the window is mapped, we need to start interactively moving it
+ if (screen->placementPolicy() == BScreen::ClickMousePlacement &&
+ place_window && !(flags.iconic || reassoc)) {
+ // if the last window wasn't placed yet, or we're just moving a window
+ // already, finish off that move cleanly
+ OpenboxWindow *w = openbox.getFocusedWindow();
+ if (w != (OpenboxWindow *) 0 && w->flags.moving)
+ w->endMove();
+
+ int x, y, rx, ry;
+ Window c, r;
+ unsigned int m;
+ XQueryPointer(openbox.getXDisplay(), screen->getRootWindow(),
+ &r, &c, &rx, &ry, &x, &y, &m);
+ startMove(rx, ry);
+ }
+
if (flags.iconic && screen->focusNew()) setInputFocus();
flags.visible = True;
if (screen->sloppyFocus() && screen->autoRaise() && timer->isTiming())
timer->stop();
+
}