Skip to content

Commit

Permalink
Fix window key grabbing
Browse files Browse the repository at this point in the history
Commit ff799a0 is incomplete. It changed the window on which we grab
keys, but only in some places. When the keyboard layout changes, we have to
re-grab these keys, but the code does so on the wrong window.

This patch fixes that oversight.

Fixes: #639
Signed-off-by: Uli Schlachter <psychon@znc.in>
  • Loading branch information
psychon committed Jan 23, 2016
1 parent 1098bee commit f128b31
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions event.c
Expand Up @@ -833,8 +833,8 @@ event_handle_mappingnotify(xcb_mapping_notify_event_t *ev)
foreach(_c, globalconf.clients)
{
client_t *c = *_c;
xcb_ungrab_key(globalconf.connection, XCB_GRAB_ANY, c->frame_window, XCB_BUTTON_MASK_ANY);
xwindow_grabkeys(c->frame_window, &c->keys);
xcb_ungrab_key(globalconf.connection, XCB_GRAB_ANY, c->window, XCB_BUTTON_MASK_ANY);
xwindow_grabkeys(c->window, &c->keys);
}
}
}
Expand Down
2 changes: 1 addition & 1 deletion objects/client.c
Expand Up @@ -2283,7 +2283,7 @@ luaA_client_keys(lua_State *L)
{
luaA_key_array_set(L, 1, 2, keys);
luaA_object_emit_signal(L, 1, "property::keys", 0);
xcb_ungrab_key(globalconf.connection, XCB_GRAB_ANY, c->frame_window, XCB_BUTTON_MASK_ANY);
xcb_ungrab_key(globalconf.connection, XCB_GRAB_ANY, c->window, XCB_BUTTON_MASK_ANY);
xwindow_grabkeys(c->window, keys);
}

Expand Down

0 comments on commit f128b31

Please sign in to comment.