]> code.delx.au - spectrwm/commitdiff
Allow apps to manually manage SKIP_TASKBAR and SKIP_PAGER ewmh_skip_taskbar_and_pager private/ewmh_skip_taskbar_and_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 15:01:00 +0000 (01:01 +1000)
spectrwm.c

index 285bac959e8cdee7b8b29241543dc0e0ab14d1dc..adc0f1b801dd56f277c58e625456aa9b7908991d 100644 (file)
@@ -1542,6 +1542,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