aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDuncaen <mail@duncano.de>2017-02-07 16:23:11 +0100
committerDuncaen <mail@duncano.de>2018-12-31 22:45:05 +0100
commit4b589f12d50354999c431ec8b3ff4fb98900e6b3 (patch)
tree28261dc7d0f16c9c9d6afa2e10919c2495b374bd
parent112d2d7856c305f41cf5191f0f8c30f6ee0dba5d (diff)
downloaddwm-4b589f12d50354999c431ec8b3ff4fb98900e6b3.tar.gz
support _NET_SUPPORTING_WM_CHECK
-rw-r--r--dwm.c14
1 files changed, 12 insertions, 2 deletions
diff --git a/dwm.c b/dwm.c
index 59ef309..93c68be 100644
--- a/dwm.c
+++ b/dwm.c
@@ -60,7 +60,7 @@
/* enums */
enum { CurNormal, CurResize, CurMove, CurLast }; /* cursor */
enum { SchemeNorm, SchemeSel }; /* color schemes */
-enum { NetSupported, NetWMName, NetWMState, NetWMCheck,
+enum { NetSupported, NetWMName, NetWMState, NetSupportingWMCheck, NetWMCheck,
NetWMFullscreen, NetActiveWindow, NetWMWindowType,
NetWMWindowTypeDialog, NetClientList, NetLast }; /* EWMH atoms */
enum { WMProtocols, WMDelete, WMState, WMTakeFocus, WMLast }; /* default atoms */
@@ -495,6 +495,7 @@ cleanup(void)
XSync(dpy, False);
XSetInputFocus(dpy, PointerRoot, RevertToPointerRoot, CurrentTime);
XDeleteProperty(dpy, root, netatom[NetActiveWindow]);
+ XDeleteProperty(dpy, root, netatom[NetSupportingWMCheck]);
}
void
@@ -1559,6 +1560,7 @@ setup(void)
wmatom[WMTakeFocus] = XInternAtom(dpy, "WM_TAKE_FOCUS", False);
netatom[NetActiveWindow] = XInternAtom(dpy, "_NET_ACTIVE_WINDOW", False);
netatom[NetSupported] = XInternAtom(dpy, "_NET_SUPPORTED", False);
+ netatom[NetSupportingWMCheck] = XInternAtom(dpy, "_NET_SUPPORTING_WM_CHECK", False);
netatom[NetWMName] = XInternAtom(dpy, "_NET_WM_NAME", False);
netatom[NetWMState] = XInternAtom(dpy, "_NET_WM_STATE", False);
netatom[NetWMCheck] = XInternAtom(dpy, "_NET_SUPPORTING_WM_CHECK", False);
@@ -1589,7 +1591,15 @@ setup(void)
XChangeProperty(dpy, root, netatom[NetSupported], XA_ATOM, 32,
PropModeReplace, (unsigned char *) netatom, NetLast);
XDeleteProperty(dpy, root, netatom[NetClientList]);
- /* select events */
+ /* EWMH support for _NET_SUPPORTING_WM_CHECK */
+ XChangeProperty(dpy, root, netatom[NetSupportingWMCheck], XA_WINDOW,
+ 32, PropModeReplace, (unsigned char *)&mons->barwin, 1);
+ XChangeProperty(dpy, mons->barwin, netatom[NetSupportingWMCheck], XA_WINDOW,
+ 32, PropModeReplace, (unsigned char *)&mons->barwin, 1);
+ XChangeProperty(dpy, mons->barwin, netatom[NetWMName],
+ XInternAtom(dpy, "UTF8_STRING", False), 8,
+ PropModeReplace, (unsigned char *)"dwm", strlen("dwm"));
+ /* select for events */
wa.cursor = cursor[CurNormal]->cursor;
wa.event_mask = SubstructureRedirectMask|SubstructureNotifyMask
|ButtonPressMask|PointerMotionMask|EnterWindowMask