feat: NetClientListStacking patch
parent
5733653eda
commit
95125129e5
13
dwm.c
13
dwm.c
|
|
@ -64,7 +64,7 @@ enum { CurNormal, CurResize, CurMove, CurLast }; /* cursor */
|
|||
enum { SchemeNorm, SchemeSel, SchemeTabActive, SchemeTabInactive }; /* color schemes */
|
||||
enum { NetSupported, NetWMName, NetWMState, NetWMCheck,
|
||||
NetWMFullscreen, NetActiveWindow, NetWMWindowType,
|
||||
NetWMWindowTypeDialog, NetClientList, NetClientInfo, NetLast }; /* EWMH atoms */
|
||||
NetWMWindowTypeDialog, NetClientList, NetClientListStacking, NetClientInfo, NetLast }; /* EWMH atoms */
|
||||
enum { WMProtocols, WMDelete, WMState, WMTakeFocus, WMLast }; /* default atoms */
|
||||
enum { ClkTagBar, ClkLtSymbol, ClkStatusText, ClkWinTitle,
|
||||
ClkClientWin, ClkRootWin, ClkLast }; /* clicks */
|
||||
|
|
@ -1302,6 +1302,8 @@ manage(Window w, XWindowAttributes *wa)
|
|||
attachstack(c);
|
||||
XChangeProperty(dpy, root, netatom[NetClientList], XA_WINDOW, 32, PropModeAppend,
|
||||
(unsigned char *) &(c->win), 1);
|
||||
XChangeProperty(dpy, root, netatom[NetClientListStacking], XA_WINDOW, 32, PropModePrepend,
|
||||
(unsigned char *) &(c->win), 1);
|
||||
XMoveResizeWindow(dpy, c->win, c->x + 2 * sw, c->y, c->w, c->h); /* some windows require this */
|
||||
setclientstate(c, NormalState);
|
||||
if (c->mon == selmon)
|
||||
|
|
@ -1882,6 +1884,7 @@ setup(void)
|
|||
netatom[NetWMWindowTypeDialog] = XInternAtom(dpy, "_NET_WM_WINDOW_TYPE_DIALOG", False);
|
||||
netatom[NetClientList] = XInternAtom(dpy, "_NET_CLIENT_LIST", False);
|
||||
netatom[NetClientInfo] = XInternAtom(dpy, "_NET_CLIENT_INFO", False);
|
||||
netatom[NetClientListStacking] = XInternAtom(dpy, "_NET_CLIENT_LIST_STACKING", False);
|
||||
/* init cursors */
|
||||
cursor[CurNormal] = drw_cur_create(drw, XC_left_ptr);
|
||||
cursor[CurResize] = drw_cur_create(drw, XC_sizing);
|
||||
|
|
@ -1906,6 +1909,7 @@ setup(void)
|
|||
PropModeReplace, (unsigned char *) netatom, NetLast);
|
||||
XDeleteProperty(dpy, root, netatom[NetClientList]);
|
||||
XDeleteProperty(dpy, root, netatom[NetClientInfo]);
|
||||
XDeleteProperty(dpy, root, netatom[NetClientListStacking]);
|
||||
/* select events */
|
||||
wa.cursor = cursor[CurNormal]->cursor;
|
||||
wa.event_mask = SubstructureRedirectMask|SubstructureNotifyMask
|
||||
|
|
@ -2223,6 +2227,13 @@ updateclientlist()
|
|||
XChangeProperty(dpy, root, netatom[NetClientList],
|
||||
XA_WINDOW, 32, PropModeAppend,
|
||||
(unsigned char *) &(c->win), 1);
|
||||
|
||||
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);
|
||||
}
|
||||
|
||||
int
|
||||
|
|
|
|||
Loading…
Reference in New Issue