From 64748671cd8de154092be76e28b4a06080712d76 Mon Sep 17 00:00:00 2001 From: Uli Schlachter Date: Tue, 16 Feb 2016 19:31:20 +0100 Subject: [PATCH] Don't modify WM_HINTS in client_set_urgent() MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit To quote from ICCCM (ยง4.1.2): "The window manager will not change properties written by the client." We tried to do this anyway to update WM_HINTS so that the current urgency state is reflected. Apparently, Chrome does a similar read-modify-set cycle and the resulting race condition meant that the "accepts input" hint on Chromium's window was permanently disabled. This helps with https://github.com/awesomeWM/awesome/issues/670, but I still think that Chrome shouldn't try to implement "please don't focus me when I do the following" by temporarily claiming "please don't ever focus me". Signed-off-by: Uli Schlachter --- objects/client.c | 14 -------------- 1 file changed, 14 deletions(-) diff --git a/objects/client.c b/objects/client.c index c6c232bd9..ff97f7a73 100644 --- a/objects/client.c +++ b/objects/client.c @@ -71,22 +71,8 @@ client_set_urgent(lua_State *L, int cidx, bool urgent) if(c->urgent != urgent) { - xcb_get_property_cookie_t hints = - xcb_icccm_get_wm_hints_unchecked(globalconf.connection, c->window); - c->urgent = urgent; - /* update ICCCM hints */ - xcb_icccm_wm_hints_t wmh; - xcb_icccm_get_wm_hints_reply(globalconf.connection, hints, &wmh, NULL); - - if(urgent) - wmh.flags |= XCB_ICCCM_WM_HINT_X_URGENCY; - else - wmh.flags &= ~XCB_ICCCM_WM_HINT_X_URGENCY; - - xcb_icccm_set_wm_hints(globalconf.connection, c->window, &wmh); - luaA_object_emit_signal(L, cidx, "property::urgent", 0); } }