]> code.delx.au - spectrwm/commitdiff
Allow apps to manually manage SKIP_TASKBAR and SKIP_PAGER
authorJames Bunton <jamesbunton@delx.net.au>
Wed, 21 Sep 2016 14:34:05 +0000 (00:34 +1000)
committerJames Bunton <jamesbunton@delx.net.au>
Fri, 23 Sep 2016 14:55:06 +0000 (00:55 +1000)
spectrwm.c

index d5dbe618c92c013db710c0b9d32ca630eea1e204..dde9b701b2889f0ef847fa1860c0db5eed2fd97c 100644 (file)
@@ -1588,6 +1588,25 @@ ewmh_autoquirk(struct ws_win *win)
                }
        }
        free(r);
+
+
+       c = xcb_get_property(conn, 0, win->id,
+           ewmh[_NET_WM_STATE].atom, XCB_ATOM_ATOM, 0, UINT32_MAX);
+       r = xcb_get_property_reply(conn, c, NULL);
+       if (r == NULL)
+               return;
+
+       type = xcb_get_property_value(r);
+       n = xcb_get_property_value_length(r) / sizeof(xcb_atom_t);
+
+       for (i = 0; i < n; i++) {
+               if (type[i] == ewmh[_NET_WM_STATE_SKIP_PAGER].atom ||
+                   type[i] == ewmh[_NET_WM_STATE_SKIP_TASKBAR].atom) {
+                       win->quirks = SWM_Q_FLOAT | SWM_Q_ANYWHERE;
+                       break;
+               }
+       }
+       free(r);
 }
 
 void