From 976b03f8a7f3d04c2b379bb6361d6cd2b96bdede 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 fc1b31d8..e5fd066b 100644 --- a/objects/client.c +++ b/objects/client.c @@ -163,22 +163,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); } }