Bugfix: Respect WM_HINTS.input for WM_TAKE_FOCUS clients

This fixes problems with Qt apps (like Quassel) and apparently Eclipse since
the last commit.
This commit is contained in:
Michael Stapelberg
2012-01-18 19:16:57 +00:00
parent e2b97a6fda
commit 2d14ced024
6 changed files with 58 additions and 25 deletions

View File

@ -80,7 +80,7 @@ void manage_window(xcb_window_t window, xcb_get_window_attributes_cookie_t cooki
xcb_get_property_cookie_t wm_type_cookie, strut_cookie, state_cookie,
utf8_title_cookie, title_cookie,
class_cookie, leader_cookie, transient_cookie,
role_cookie, startup_id_cookie;
role_cookie, startup_id_cookie, wm_hints_cookie;
geomc = xcb_get_geometry(conn, d);
@ -142,6 +142,7 @@ void manage_window(xcb_window_t window, xcb_get_window_attributes_cookie_t cooki
class_cookie = GET_PROPERTY(XCB_ATOM_WM_CLASS, 128);
role_cookie = GET_PROPERTY(A_WM_WINDOW_ROLE, 128);
startup_id_cookie = GET_PROPERTY(A__NET_STARTUP_ID, 512);
wm_hints_cookie = xcb_icccm_get_wm_hints(conn, window);
/* TODO: also get wm_normal_hints here. implement after we got rid of xcb-event */
DLOG("Managing window 0x%08x\n", window);
@ -169,6 +170,7 @@ void manage_window(xcb_window_t window, xcb_get_window_attributes_cookie_t cooki
window_update_transient_for(cwindow, xcb_get_property_reply(conn, transient_cookie, NULL));
window_update_strut_partial(cwindow, xcb_get_property_reply(conn, strut_cookie, NULL));
window_update_role(cwindow, xcb_get_property_reply(conn, role_cookie, NULL), true);
window_update_hints(cwindow, xcb_get_property_reply(conn, wm_hints_cookie, NULL));
xcb_get_property_reply_t *startup_id_reply;
startup_id_reply = xcb_get_property_reply(conn, startup_id_cookie, NULL);