X-Git-Url: https://git.sur5r.net/?a=blobdiff_plain;f=src%2Fmainx.c;h=27e026b57ec3881b2d3bcba92d06a617993fe40f;hb=3114d6821dd9679f7702b90732f2648482d8cc06;hp=03cb9d1b647d53034ec3e9abb0c63c6c679d70fb;hpb=af3972aa9fd691a9723bb816a954704d50794ad6;p=i3%2Fi3 diff --git a/src/mainx.c b/src/mainx.c index 03cb9d1b..27e026b5 100644 --- a/src/mainx.c +++ b/src/mainx.c @@ -178,6 +178,7 @@ int main(int argc, char *argv[], char *env[]) { REQUEST_ATOM(WM_DELETE_WINDOW); REQUEST_ATOM(UTF8_STRING); REQUEST_ATOM(WM_STATE); + REQUEST_ATOM(WM_CLIENT_LEADER); /* TODO: this has to be more beautiful somewhen */ int major, minor, error; @@ -308,6 +309,7 @@ int main(int argc, char *argv[], char *env[]) { GET_ATOM(WM_DELETE_WINDOW); GET_ATOM(UTF8_STRING); GET_ATOM(WM_STATE); + GET_ATOM(WM_CLIENT_LEADER); xcb_property_set_handler(&prophs, atoms[_NET_WM_WINDOW_TYPE], UINT_MAX, handle_window_type, NULL); /* TODO: In order to comply with EWMH, we have to watch _NET_WM_STRUT_PARTIAL */ @@ -324,6 +326,9 @@ int main(int argc, char *argv[], char *env[]) { /* Watch WM_CLASS (= class of the window) */ xcb_property_set_handler(&prophs, WM_CLASS, 128, handle_windowclass_change, NULL); + /* Watch WM_CLIENT_LEADER (= logical parent window for toolbars etc.) */ + xcb_property_set_handler(&prophs, atoms[WM_CLIENT_LEADER], UINT_MAX, handle_clientleader_change, NULL); + /* Set up the atoms we support */ check_error(conn, xcb_change_property_checked(conn, XCB_PROP_MODE_REPLACE, root, atoms[_NET_SUPPORTED], ATOM, 32, 7, atoms), "Could not set _NET_SUPPORTED");