]> git.lizzy.rs Git - bspwm.git/commitdiff
Fix motion recorder being activated erroneously
authorBastien Dejean <nihilhill@gmail.com>
Fri, 22 Mar 2013 17:26:30 +0000 (18:26 +0100)
committerBastien Dejean <nihilhill@gmail.com>
Fri, 22 Mar 2013 17:26:30 +0000 (18:26 +0100)
We need to check which window is under the pointer after having changed
the z-order of windows.

tree.c

diff --git a/tree.c b/tree.c
index e5041b74c00f7bc63f12bacf80f80036d7f8d864..00fd26862f1bee163283bd29449013e354e10bc5 100644 (file)
--- a/tree.c
+++ b/tree.c
@@ -402,6 +402,13 @@ void focus_node(monitor_t *m, desktop_t *d, node_t *n, bool is_mapped)
         xcb_set_input_focus(dpy, XCB_INPUT_FOCUS_POINTER_ROOT, n->client->window, XCB_CURRENT_TIME);
     }
 
+    if (!is_tiled(n->client)) {
+        if (!adaptative_raise || !might_cover(d, n))
+            window_raise(n->client->window);
+    } else {
+        window_pseudo_raise(d, n->client->window);
+    }
+
     if (focus_follows_pointer) {
         xcb_window_t win = XCB_NONE;
         query_pointer(&win, NULL);
@@ -411,13 +418,6 @@ void focus_node(monitor_t *m, desktop_t *d, node_t *n, bool is_mapped)
             disable_motion_recorder();
     }
 
-    if (!is_tiled(n->client)) {
-        if (!adaptative_raise || !might_cover(d, n))
-            window_raise(n->client->window);
-    } else {
-        window_pseudo_raise(d, n->client->window);
-    }
-
     if (d->focus != n) {
         d->last_focus = d->focus;
         d->focus = n;