diff options
-rw-r--r-- | docs/userguide | 4 | ||||
-rw-r--r-- | release-notes/changes/1-grab-pointer | 1 | ||||
-rw-r--r-- | src/bindings.c | 8 |
3 files changed, 7 insertions, 6 deletions
diff --git a/docs/userguide b/docs/userguide index d211c1d5..9f11cd2b 100644 --- a/docs/userguide +++ b/docs/userguide @@ -512,8 +512,8 @@ your bindings in the same physical location on the keyboard, use keycodes. If you don’t switch layouts, and want a clean and simple config file, use keysyms. -Some tools (such as +import+ or +xdotool+) might be unable to run upon a -KeyPress event, because the keyboard/pointer is still grabbed. For these +Some tools (such as +xdotool+) might be unable to run upon a +KeyPress event, because the keyboard is still grabbed. For these situations, the +--release+ flag can be used, which will execute the command after the keys have been released. diff --git a/release-notes/changes/1-grab-pointer b/release-notes/changes/1-grab-pointer new file mode 100644 index 00000000..99166644 --- /dev/null +++ b/release-notes/changes/1-grab-pointer @@ -0,0 +1 @@ +do not grab pointer when executing bindings diff --git a/src/bindings.c b/src/bindings.c index e5804919..88d7182a 100644 --- a/src/bindings.c +++ b/src/bindings.c @@ -126,9 +126,9 @@ static bool binding_in_current_group(const Binding *bind) { static void grab_keycode_for_binding(xcb_connection_t *conn, Binding *bind, uint32_t keycode) { /* Grab the key in all combinations */ -#define GRAB_KEY(modifier) \ - do { \ - xcb_grab_key(conn, 0, root, modifier, keycode, XCB_GRAB_MODE_SYNC, XCB_GRAB_MODE_ASYNC); \ +#define GRAB_KEY(modifier) \ + do { \ + xcb_grab_key(conn, 0, root, modifier, keycode, XCB_GRAB_MODE_ASYNC, XCB_GRAB_MODE_ASYNC); \ } while (0) const int mods = (bind->event_state_mask & 0xFFFF); DLOG("Binding %p Grabbing keycode %d with event state mask 0x%x (mods 0x%x)\n", @@ -166,7 +166,7 @@ void grab_all_keys(xcb_connection_t *conn) { const int keycode = binding_keycode->keycode; const int mods = (binding_keycode->modifiers & 0xFFFF); DLOG("Binding %p Grabbing keycode %d with mods %d\n", bind, keycode, mods); - xcb_grab_key(conn, 0, root, mods, keycode, XCB_GRAB_MODE_SYNC, XCB_GRAB_MODE_ASYNC); + xcb_grab_key(conn, 0, root, mods, keycode, XCB_GRAB_MODE_ASYNC, XCB_GRAB_MODE_ASYNC); } } } |