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 (!(flags.iconic || reassoc) &&
+ screen->placementPolicy() == BScreen::ClickMousePlacement) {
+ // 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();
+
}
if (! win)
win = new OpenboxWindow(*this, e->xmaprequest.window);
- if ((win = searchWindow(e->xmaprequest.window))) {
+ if ((win = searchWindow(e->xmaprequest.window)))
win->mapRequestEvent(&e->xmaprequest);
- // 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 (win->getScreen()->placementPolicy() == BScreen::ClickMousePlacement) {
- int x, y, rx, ry;
- Window c, r;
- unsigned int m;
- XQueryPointer(getXDisplay(), win->getScreen()->getRootWindow(),
- &r, &c, &rx, &ry, &x, &y, &m);
- win->startMove(rx, ry);
- }
- }
+
break;
}