From 16c560a568ca6f06990a0d7d4d8de3e9a77db8ec Mon Sep 17 00:00:00 2001 From: gldrk Date: Tue, 26 Sep 2023 06:19:09 +0300 Subject: [PATCH] Release all grabs when unmanaging windows MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit When a window is unmapped, awesome stops tracking it, possibly leaving stale grabs behind. These grabs can be activated if the window is mapped again without awesome’s knowledge. This results in a locked pointer until the grab window is destroyed. Fix by releasing passive grabs before untracking a client window. --- objects/client.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/objects/client.c b/objects/client.c index 6bd8df267..6946dbc63 100644 --- a/objects/client.c +++ b/objects/client.c @@ -3010,6 +3010,8 @@ client_unmanage(client_t *c, client_unmanage_t reason) if(reason != CLIENT_UNMANAGE_DESTROYED) { + xwindow_buttons_grab(c->window, &(button_array_t){ .len = 0 }); + xwindow_grabkeys(c->window, &(key_array_t){ .len = 0 }); area_t geometry = client_get_undecorated_geometry(c); xcb_unmap_window(globalconf.connection, c->window); xcb_reparent_window(globalconf.connection, c->window, globalconf.screen->root,