As documented here: 
http://standards.freedesktop.org/wm-spec/wm-spec-1.3.html#idm140130317670464
---

I developed this in the hopes that it would fix issues with feh running
fullscreen. It didn't help with that (feh using the innacurate _MOTIF_WM_HINTS
method) but it should at least stop gtk+ 3.3.8+ from polling regularly for WM
features.

The change to gtk+ is discussed here: 
https://bugzilla.gnome.org/show_bug.cgi?id=666921


 dwm.c | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)

diff --git a/dwm.c b/dwm.c
index 169adcb..1e53a68 100644
--- a/dwm.c
+++ b/dwm.c
@@ -62,7 +62,7 @@ enum { CurNormal, CurResize, CurMove, CurLast }; /* cursor */
 enum { SchemeNorm, SchemeSel, SchemeLast }; /* color schemes */
 enum { NetSupported, NetWMName, NetWMState,
        NetWMFullscreen, NetActiveWindow, NetWMWindowType,
-       NetWMWindowTypeDialog, NetClientList, NetLast }; /* EWMH atoms */
+       NetWMWindowTypeDialog, NetClientList, NetSupportingWMCheck, NetLast }; 
/* EWMH atoms */
 enum { WMProtocols, WMDelete, WMState, WMTakeFocus, WMLast }; /* default atoms 
*/
 enum { ClkTagBar, ClkLtSymbol, ClkStatusText, ClkWinTitle,
        ClkClientWin, ClkRootWin, ClkLast }; /* clicks */
@@ -1526,6 +1526,7 @@ setup(void) {
        netatom[NetWMWindowType] = XInternAtom(dpy, "_NET_WM_WINDOW_TYPE", 
False);
        netatom[NetWMWindowTypeDialog] = XInternAtom(dpy, 
"_NET_WM_WINDOW_TYPE_DIALOG", False);
        netatom[NetClientList] = XInternAtom(dpy, "_NET_CLIENT_LIST", False);
+       netatom[NetSupportingWMCheck] = XInternAtom(dpy, 
"_NET_SUPPORTING_WM_CHECK", False);
        /* init cursors */
        cursor[CurNormal] = drw_cur_create(drw, XC_left_ptr);
        cursor[CurResize] = drw_cur_create(drw, XC_sizing);
@@ -1744,6 +1745,12 @@ updatebars(void) {
                m->barwin = XCreateWindow(dpy, root, m->wx, m->by, m->ww, bh, 
0, DefaultDepth(dpy, screen),
                                          CopyFromParent, DefaultVisual(dpy, 
screen),
                                          
CWOverrideRedirect|CWBackPixmap|CWEventMask, &wa);
+               XChangeProperty(dpy, root, netatom[NetSupportingWMCheck], 
XA_WINDOW, 32,
+                               PropModeReplace, (unsigned char *) 
&(m->barwin), 1);
+               XChangeProperty(dpy, m->barwin, netatom[NetSupportingWMCheck], 
XA_WINDOW, 32,
+                               PropModeReplace, (unsigned char *) 
&(m->barwin), 1);
+               XChangeProperty(dpy, m->barwin, netatom[NetWMName], XA_STRING, 
8,
+                               PropModeReplace, (unsigned char *) "dwm", 3);
                XDefineCursor(dpy, m->barwin, cursor[CurNormal]->cursor);
                XMapRaised(dpy, m->barwin);
        }
-- 
2.1.4


Reply via email to