]> git.sur5r.net Git - i3/i3/blobdiff - src/bindings.c
Allow mouse bindings to run on the root window.
[i3/i3] / src / bindings.c
index b9d994ea3ce566db2d96ed53bb35f79bb2b94254..16235a1e2bbe4a81449347a21044f198572a9999 100644 (file)
@@ -164,6 +164,10 @@ void regrab_all_buttons(xcb_connection_t *conn) {
         xcb_grab_buttons(conn, con->window->id, grab_scrollwheel);
     }
 
+    /* Also grab the root window to allow bindings to work on there as well. */
+    xcb_ungrab_button(conn, XCB_BUTTON_INDEX_ANY, root, XCB_BUTTON_MASK_ANY);
+    xcb_grab_buttons(conn, root, grab_scrollwheel);
+
     xcb_ungrab_server(conn);
 }