Fix window key grabbing

Commit ff799a0f5d 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: https://github.com/awesomeWM/awesome/issues/639
Signed-off-by: Uli Schlachter <psychon@znc.in>
This commit is contained in:
Uli Schlachter 2016-01-23 13:14:30 +01:00
parent 1098bee582
commit f128b31313
2 changed files with 3 additions and 3 deletions

View File

@ -833,8 +833,8 @@ event_handle_mappingnotify(xcb_mapping_notify_event_t *ev)
foreach(_c, globalconf.clients) foreach(_c, globalconf.clients)
{ {
client_t *c = *_c; client_t *c = *_c;
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->frame_window, &c->keys); xwindow_grabkeys(c->window, &c->keys);
} }
} }
} }

View File

@ -2283,7 +2283,7 @@ luaA_client_keys(lua_State *L)
{ {
luaA_key_array_set(L, 1, 2, keys); luaA_key_array_set(L, 1, 2, keys);
luaA_object_emit_signal(L, 1, "property::keys", 0); 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); xwindow_grabkeys(c->window, keys);
} }