Add current state of my dwm config
This commit is contained in:
45
0001-add-support-for-_NET_SUPPORTING_WM_CHECK.patch
Normal file
45
0001-add-support-for-_NET_SUPPORTING_WM_CHECK.patch
Normal file
@@ -0,0 +1,45 @@
|
||||
/* https://bbs.archlinux.org/viewtopic.php?pid=1635677#p1635677 */
|
||||
diff --git a/dwm.c b/dwm.c
|
||||
index ff7e096..454fb36 100644
|
||||
--- a/dwm.c
|
||||
+++ b/dwm.c
|
||||
@@ -60,7 +60,7 @@
|
||||
/* enums */
|
||||
enum { CurNormal, CurResize, CurMove, CurLast }; /* cursor */
|
||||
enum { SchemeNorm, SchemeSel, SchemeLast }; /* color schemes */
|
||||
-enum { NetSupported, NetWMName, NetWMState,
|
||||
+enum { NetSupported, NetWMName, NetWMState, NetSupportingWMCheck,
|
||||
NetWMFullscreen, NetActiveWindow, NetWMWindowType,
|
||||
NetWMWindowTypeDialog, NetClientList, NetLast }; /* EWMH atoms */
|
||||
enum { WMProtocols, WMDelete, WMState, WMTakeFocus, WMLast }; /* default atoms */
|
||||
@@ -490,6 +490,7 @@ cleanup(void)
|
||||
XSync(dpy, False);
|
||||
XSetInputFocus(dpy, PointerRoot, RevertToPointerRoot, CurrentTime);
|
||||
XDeleteProperty(dpy, root, netatom[NetActiveWindow]);
|
||||
+ XDeleteProperty(dpy, root, netatom[NetSupportingWMCheck]);
|
||||
}
|
||||
|
||||
void
|
||||
@@ -1574,6 +1575,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[NetWMFullscreen] = XInternAtom(dpy, "_NET_WM_STATE_FULLSCREEN", False);
|
||||
@@ -1598,6 +1600,14 @@ setup(void)
|
||||
XChangeProperty(dpy, root, netatom[NetSupported], XA_ATOM, 32,
|
||||
PropModeReplace, (unsigned char *) netatom, NetLast);
|
||||
XDeleteProperty(dpy, root, netatom[NetClientList]);
|
||||
+ /* 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
|
||||
Reference in New Issue
Block a user