summaryrefslogtreecommitdiffhomepage
path: root/dwm.c
diff options
context:
space:
mode:
authorbakkeby <[email protected]>2020-10-26 11:10:14 +0100
committerbakkeby <[email protected]>2020-10-26 11:10:14 +0100
commit45d05c6c48485ff0cf1339cd6edb29dec2984c6a (patch)
tree6b8038ad074b48f7464214bec53fdd9adc63c530 /dwm.c
parent5edf4bab172157288985c483009f846cc8b15478 (diff)
downloaddwm-flexipatch-45d05c6c48485ff0cf1339cd6edb29dec2984c6a.tar.gz
dwm-flexipatch-45d05c6c48485ff0cf1339cd6edb29dec2984c6a.zip
Adding the _NET_CLIENT_LIST_STACKING patch
Diffstat (limited to 'dwm.c')
-rw-r--r--dwm.c25
1 files changed, 24 insertions, 1 deletions
diff --git a/dwm.c b/dwm.c
index 50ccb38..aa3b145 100644
--- a/dwm.c
+++ b/dwm.c
@@ -183,7 +183,11 @@ enum {
#if BAR_EWMHTAGS_PATCH
NetDesktopNames, NetDesktopViewport, NetNumberOfDesktops, NetCurrentDesktop,
#endif // BAR_EWMHTAGS_PATCH
- NetClientList, NetLast
+ NetClientList,
+ #if NET_CLIENT_LIST_STACKING_PATCH
+ NetClientListStacking,
+ #endif // NET_CLIENT_LIST_STACKING_PATCH
+ NetLast
}; /* EWMH atoms */
enum {
@@ -2264,6 +2268,10 @@ manage(Window w, XWindowAttributes *wa)
attachstack(c);
XChangeProperty(dpy, root, netatom[NetClientList], XA_WINDOW, 32, PropModeAppend,
(unsigned char *) &(c->win), 1);
+ #if NET_CLIENT_LIST_STACKING_PATCH
+ XChangeProperty(dpy, root, netatom[NetClientListStacking], XA_WINDOW, 32, PropModePrepend,
+ (unsigned char *) &(c->win), 1);
+ #endif // NET_CLIENT_LIST_STACKING_PATCH
XMoveResizeWindow(dpy, c->win, c->x + 2 * sw, c->y, c->w, c->h); /* some windows require this */
#if BAR_WINTITLEACTIONS_PATCH
@@ -3325,6 +3333,9 @@ setup(void)
netatom[NetWMFullscreen] = XInternAtom(dpy, "_NET_WM_STATE_FULLSCREEN", False);
netatom[NetWMWindowType] = XInternAtom(dpy, "_NET_WM_WINDOW_TYPE", False);
netatom[NetClientList] = XInternAtom(dpy, "_NET_CLIENT_LIST", False);
+ #if NET_CLIENT_LIST_STACKING_PATCH
+ netatom[NetClientListStacking] = XInternAtom(dpy, "_NET_CLIENT_LIST_STACKING", False);
+ #endif // NET_CLIENT_LIST_STACKING_PATCH
#if DECORATION_HINTS_PATCH
motifatom = XInternAtom(dpy, "_MOTIF_WM_HINTS", False);
#endif // DECORATION_HINTS_PATCH
@@ -3403,6 +3414,9 @@ setup(void)
setviewport();
#endif // BAR_EWMHTAGS_PATCH
XDeleteProperty(dpy, root, netatom[NetClientList]);
+ #if NET_CLIENT_LIST_STACKING_PATCH
+ XDeleteProperty(dpy, root, netatom[NetClientListStacking]);
+ #endif // NET_CLIENT_LIST_STACKING_PATCH
/* select events */
wa.cursor = cursor[CurNormal]->cursor;
wa.event_mask = SubstructureRedirectMask|SubstructureNotifyMask
@@ -4047,6 +4061,15 @@ updateclientlist()
XChangeProperty(dpy, root, netatom[NetClientList],
XA_WINDOW, 32, PropModeAppend,
(unsigned char *) &(c->win), 1);
+
+ #if NET_CLIENT_LIST_STACKING_PATCH
+ XDeleteProperty(dpy, root, netatom[NetClientListStacking]);
+ for (m = mons; m; m = m->next)
+ for (c = m->stack; c; c = c->snext)
+ XChangeProperty(dpy, root, netatom[NetClientListStacking],
+ XA_WINDOW, 32, PropModeAppend,
+ (unsigned char *) &(c->win), 1);
+ #endif // NET_CLIENT_LIST_STACKING_PATCH
}
int