Adding the _NET_CLIENT_LIST_STACKING patch

pull/74/head
bakkeby 4 years ago
parent 5edf4bab17
commit 45d05c6c48

@ -15,6 +15,8 @@ Refer to [https://dwm.suckless.org/](https://dwm.suckless.org/) for details on t
### Changelog: ### Changelog:
2020-10-26 - Added the \_NET\_CLIENT\_LIST\_STACKING patch
2020-09-29 - Added the on\_empty\_keys patch (ported from InstantOS) 2020-09-29 - Added the on\_empty\_keys patch (ported from InstantOS)
2020-09-28 - Added the \_IS\_FLOATING patch (embedded in the EWMHTAGS patch) 2020-09-28 - Added the \_IS\_FLOATING patch (embedded in the EWMHTAGS patch)
@ -412,6 +414,9 @@ Refer to [https://dwm.suckless.org/](https://dwm.suckless.org/) for details on t
- [movestack](https://dwm.suckless.org/patches/movestack/) - [movestack](https://dwm.suckless.org/patches/movestack/)
- allows you to move clients around in the stack and swap them with the master - allows you to move clients around in the stack and swap them with the master
- [netclientliststacking](https://github.com/bakkeby/patches/wiki/netclientliststacking)
- adds support for the \_NET\_CLIENT\_LIST\_STACKING atom, needed by certain applications like the Zoom video conferencing application
- [noborder](https://dwm.suckless.org/patches/noborder/) - [noborder](https://dwm.suckless.org/patches/noborder/)
- removes the border when there is only one window visible - removes the border when there is only one window visible

25
dwm.c

@ -183,7 +183,11 @@ enum {
#if BAR_EWMHTAGS_PATCH #if BAR_EWMHTAGS_PATCH
NetDesktopNames, NetDesktopViewport, NetNumberOfDesktops, NetCurrentDesktop, NetDesktopNames, NetDesktopViewport, NetNumberOfDesktops, NetCurrentDesktop,
#endif // BAR_EWMHTAGS_PATCH #endif // BAR_EWMHTAGS_PATCH
NetClientList, NetLast NetClientList,
#if NET_CLIENT_LIST_STACKING_PATCH
NetClientListStacking,
#endif // NET_CLIENT_LIST_STACKING_PATCH
NetLast
}; /* EWMH atoms */ }; /* EWMH atoms */
enum { enum {
@ -2264,6 +2268,10 @@ manage(Window w, XWindowAttributes *wa)
attachstack(c); attachstack(c);
XChangeProperty(dpy, root, netatom[NetClientList], XA_WINDOW, 32, PropModeAppend, XChangeProperty(dpy, root, netatom[NetClientList], XA_WINDOW, 32, PropModeAppend,
(unsigned char *) &(c->win), 1); (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 */ XMoveResizeWindow(dpy, c->win, c->x + 2 * sw, c->y, c->w, c->h); /* some windows require this */
#if BAR_WINTITLEACTIONS_PATCH #if BAR_WINTITLEACTIONS_PATCH
@ -3325,6 +3333,9 @@ setup(void)
netatom[NetWMFullscreen] = XInternAtom(dpy, "_NET_WM_STATE_FULLSCREEN", False); netatom[NetWMFullscreen] = XInternAtom(dpy, "_NET_WM_STATE_FULLSCREEN", False);
netatom[NetWMWindowType] = XInternAtom(dpy, "_NET_WM_WINDOW_TYPE", False); netatom[NetWMWindowType] = XInternAtom(dpy, "_NET_WM_WINDOW_TYPE", False);
netatom[NetClientList] = XInternAtom(dpy, "_NET_CLIENT_LIST", 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 #if DECORATION_HINTS_PATCH
motifatom = XInternAtom(dpy, "_MOTIF_WM_HINTS", False); motifatom = XInternAtom(dpy, "_MOTIF_WM_HINTS", False);
#endif // DECORATION_HINTS_PATCH #endif // DECORATION_HINTS_PATCH
@ -3403,6 +3414,9 @@ setup(void)
setviewport(); setviewport();
#endif // BAR_EWMHTAGS_PATCH #endif // BAR_EWMHTAGS_PATCH
XDeleteProperty(dpy, root, netatom[NetClientList]); XDeleteProperty(dpy, root, netatom[NetClientList]);
#if NET_CLIENT_LIST_STACKING_PATCH
XDeleteProperty(dpy, root, netatom[NetClientListStacking]);
#endif // NET_CLIENT_LIST_STACKING_PATCH
/* select events */ /* select events */
wa.cursor = cursor[CurNormal]->cursor; wa.cursor = cursor[CurNormal]->cursor;
wa.event_mask = SubstructureRedirectMask|SubstructureNotifyMask wa.event_mask = SubstructureRedirectMask|SubstructureNotifyMask
@ -4047,6 +4061,15 @@ updateclientlist()
XChangeProperty(dpy, root, netatom[NetClientList], XChangeProperty(dpy, root, netatom[NetClientList],
XA_WINDOW, 32, PropModeAppend, XA_WINDOW, 32, PropModeAppend,
(unsigned char *) &(c->win), 1); (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 int

@ -644,6 +644,12 @@
*/ */
#define MOVESTACK_PATCH 0 #define MOVESTACK_PATCH 0
/* Adds support for the _NET_CLIENT_LIST_STACKING atom, needed by certain applications like the
* Zoom video conferencing application.
* https://github.com/bakkeby/patches/wiki/netclientliststacking/
*/
#define NET_CLIENT_LIST_STACKING_PATCH 0
/* Removes the border when there is only one window visible. /* Removes the border when there is only one window visible.
* https://dwm.suckless.org/patches/noborder/ * https://dwm.suckless.org/patches/noborder/
*/ */

Loading…
Cancel
Save