X-Git-Url: https://git.sur5r.net/?a=blobdiff_plain;f=src%2Fmain.c;h=787ff6fb0b1a1bd623ccf79c91fa009204a2134a;hb=db651679c568109b19d2c9bb5270f3359d57fd10;hp=2fe64b807df5b97d9c4c917b6e289a92d9864326;hpb=4d12e18571f53f0eb80f0422d79d1044cc7ed92b;p=i3%2Fi3 diff --git a/src/main.c b/src/main.c index 2fe64b80..787ff6fb 100644 --- a/src/main.c +++ b/src/main.c @@ -218,6 +218,9 @@ int main(int argc, char *argv[]) { for us is _NET_WM_STATE, we honour _NET_WM_STATE_FULLSCREEN */ xcb_event_set_client_message_handler(&evenths, handle_client_message, NULL); + /* Configure request = window tried to change size on its own */ + xcb_event_set_configure_request_handler(&evenths, handle_configure_request, NULL); + /* Setup NetWM atoms */ #define GET_ATOM(name) \ do { \ @@ -261,6 +264,15 @@ int main(int argc, char *argv[]) { /* Watch WM_NAME (title of the window encoded in COMPOUND_TEXT) */ xcb_watch_wm_name(&prophs, 128, handle_windowname_change_legacy, NULL); + /* Watch WM_NORMAL_HINTS (aspect ratio, size increments, …) */ + xcb_property_set_handler(&prophs, WM_NORMAL_HINTS, UINT_MAX, handle_normal_hints, 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); + + /* Watch WM_TRANSIENT_FOR property (to which client this popup window belongs) */ + xcb_property_set_handler(&prophs, WM_TRANSIENT_FOR, UINT_MAX, handle_transient_for, NULL); + /* Set up the atoms we support */ xcb_change_property(conn, XCB_PROP_MODE_REPLACE, root, atoms[_NET_SUPPORTED], ATOM, 32, 7, atoms); /* Set up the window manager’s name */