diff options
| author | Dana Jansens <danakj@orodu.net> | 2002-04-28 19:09:25 +0000 |
|---|---|---|
| committer | Dana Jansens <danakj@orodu.net> | 2002-04-28 19:09:25 +0000 |
| commit | 4852193a578ea3c33f8685fd87322503c28e5544 (patch) | |
| tree | b8624c309852acb65831c0d21c21d2b3090a198a /src/Window.cc | |
| parent | 1789f16af9d853e3961cbb7c0c753e0e12263969 (diff) | |
properly handle placing a window while another window is still placing.
Diffstat (limited to 'src/Window.cc')
| -rw-r--r-- | src/Window.cc | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/src/Window.cc b/src/Window.cc index 7ce182dc..8df9ddfe 100644 --- a/src/Window.cc +++ b/src/Window.cc @@ -1465,6 +1465,24 @@ void OpenboxWindow::deiconify(Bool reassoc, Bool raise) { 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; @@ -1725,6 +1743,7 @@ void OpenboxWindow::setFocusFlag(Bool focus) { if (screen->sloppyFocus() && screen->autoRaise() && timer->isTiming()) timer->stop(); + } |
