Don't modify WM_HINTS in client_set_urgent()
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 <psychon@znc.in>
This commit is contained in:
parent
dfe44a1571
commit
64748671cd
|
@ -71,22 +71,8 @@ client_set_urgent(lua_State *L, int cidx, bool urgent)
|
||||||
|
|
||||||
if(c->urgent != urgent)
|
if(c->urgent != urgent)
|
||||||
{
|
{
|
||||||
xcb_get_property_cookie_t hints =
|
|
||||||
xcb_icccm_get_wm_hints_unchecked(globalconf.connection, c->window);
|
|
||||||
|
|
||||||
c->urgent = urgent;
|
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);
|
luaA_object_emit_signal(L, cidx, "property::urgent", 0);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue