]> git.sur5r.net Git - i3/i3/blobdiff - src/workspace.c
Bugfix: Ignore enter_notify when warping pointer (makes "goto" work correctly)
[i3/i3] / src / workspace.c
index c950df8f92e27eda7e9ea56140889a6a855f10c3..2798687dad641094e769977076d8e8719d6ff1ec 100644 (file)
@@ -29,6 +29,7 @@
 #include "log.h"
 #include "ewmh.h"
 #include "ipc.h"
+#include "handlers.h"
 
 /*
  * Returns a pointer to the workspace with the given number (starting at 0),
@@ -139,8 +140,10 @@ void workspace_show(xcb_connection_t *conn, int workspace) {
                         need_warp = true;
                 else {
                         Rect *dims = &(c_ws->output->rect);
-                        xcb_warp_pointer(conn, XCB_NONE, root, 0, 0, 0, 0,
+                        xcb_void_cookie_t cookie;
+                        cookie = xcb_warp_pointer(conn, XCB_NONE, root, 0, 0, 0, 0,
                                          dims->x + (dims->width / 2), dims->y + (dims->height / 2));
+                        add_ignore_event(cookie.sequence);
                 }
 
                 /* Re-decorate the old client, it’s not focused anymore */