Commit 76f9291b532537750c2797f6ae2e8e4a01bfcc4c Parent: 37ff3e3a4f1995c70f4aa6e19229dd145bab0f08 Author: mcol <mcol@posteo.net> Date: 2020-04-20 11:22:36 +0100 Committer: mcol <mcol@posteo.net> Committed: 2020-04-20 11:22:36 +0100 set window type to dock and request to be in all desktops
xoop.c Modified
@@ -36,19 +36,34 @@ void set_window_type(xcb_window_t wid) { - xcb_intern_atom_cookie_t cookie1, cookie2; - xcb_intern_atom_reply_t *reply1, *reply2; - - cookie1 = xcb_intern_atom(conn, 0, 19, "_NET_WM_WINDOW_TYPE"); - reply1 = xcb_intern_atom_reply(conn, cookie1, NULL); - cookie2 = xcb_intern_atom(conn, 0, 32, "_NET_WM_WINDOW_TYPE_NOTIFICATION"); - reply2 = xcb_intern_atom_reply(conn, cookie2, NULL); + xcb_intern_atom_reply_t *reply1, *reply2, *reply3; + reply1 = xcb_intern_atom_reply( + conn, + xcb_intern_atom(conn, 0, 19, "_NET_WM_WINDOW_TYPE"), + NULL + ); + reply2 = xcb_intern_atom_reply( + conn, + xcb_intern_atom(conn, 0, 24, "_NET_WM_WINDOW_TYPE_DOCK"), + NULL + ); xcb_change_property( conn, XCB_PROP_MODE_REPLACE, wid, reply1->atom, XCB_ATOM_ATOM, 32, 1, &reply2->atom ); + + reply3 = xcb_intern_atom_reply( + conn, + xcb_intern_atom(conn, 0, 15, "_NET_WM_DESKTOP"), + NULL + ); + xcb_change_property( + conn, XCB_PROP_MODE_REPLACE, wid, reply3->atom, XCB_ATOM_INTEGER, 1, 1, (uint32_t []){ 0xFFFFFFFF } + ); + free(reply1); free(reply2); + free(reply3); }