From f128b313130ad10dfa6a8e1bdf8e360038aee378 Mon Sep 17 00:00:00 2001 From: Uli Schlachter Date: Sat, 23 Jan 2016 13:14:30 +0100 Subject: [PATCH] Fix window key grabbing Commit ff799a0f5dba06b 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 --- event.c | 4 ++-- objects/client.c | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/event.c b/event.c index 80d6bd66d..b4056ebdc 100644 --- a/event.c +++ b/event.c @@ -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); } } } diff --git a/objects/client.c b/objects/client.c index 703362df2..9beaf9612 100644 --- a/objects/client.c +++ b/objects/client.c @@ -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); }