summaryrefslogtreecommitdiff
path: root/src/Window.cc
diff options
context:
space:
mode:
authorDana Jansens <danakj@orodu.net>2002-08-21 07:47:52 +0000
committerDana Jansens <danakj@orodu.net>2002-08-21 07:47:52 +0000
commita9bfdcaa06b42e9c0de06042f79d1920361aaa25 (patch)
tree83c6ebcf1247ac83b0eb87046eb97552c3775035 /src/Window.cc
parent183cf03a4f45196213c9d52d6cfe4b9da00d3e26 (diff)
making warping work.. hopefully.
fix for leaving !normal windows behind in the window list
Diffstat (limited to 'src/Window.cc')
-rw-r--r--src/Window.cc20
1 files changed, 11 insertions, 9 deletions
diff --git a/src/Window.cc b/src/Window.cc
index 7271ad08..98696a56 100644
--- a/src/Window.cc
+++ b/src/Window.cc
@@ -3119,12 +3119,8 @@ void BlackboxWindow::doWorkspaceWarping(int x_root, int y_root,
return;
endMove();
+
bool focus = flags.focused; // had focus while moving?
- if (! flags.stuck)
- screen->reassociateWindow(this, dest, False);
- screen->changeWorkspaceID(dest);
- if (focus)
- setInputFocus();
int dest_x = x_root;
if (x_root <= 0) {
@@ -3136,20 +3132,26 @@ void BlackboxWindow::doWorkspaceWarping(int x_root, int y_root,
}
/*
- We grab the X server here because we are moving the window and then the
- mouse cursor. When one moves, it could end up putting the mouse cursor
- over another window for a moment. This can cause the warp to iniate a
- move on another window.
+ We grab the X server here so that we dont end up magically grabbing
+ a different window dring the warp.
*/
XGrabServer(blackbox->getXDisplay());
+ if (! flags.stuck)
+ screen->reassociateWindow(this, dest, False);
+ screen->changeWorkspaceID(dest);
+
configure(dx, dy, frame.rect.width(), frame.rect.height());
+
XWarpPointer(blackbox->getXDisplay(), None,
screen->getRootWindow(), 0, 0, 0, 0,
dest_x, y_root);
XUngrabServer(blackbox->getXDisplay());
+ if (focus)
+ setInputFocus();
+
beginMove(dest_x, y_root);
}