all repos — dwm @ 3bfc43c3d01d710c4828d75a8a5a9b910ee90dff

my dwm build

applied Andreas Amanns' netwm_client_list patch, but with some indentation fixes
anselm@garbe.us unknown
Sun, 25 Mar 2012 17:49:35 +0200
commit

3bfc43c3d01d710c4828d75a8a5a9b910ee90dff

parent

c1128417a991258b2382a76ec4529b213ee15c91

1 files changed, 20 insertions(+), 1 deletions(-)

jump to
M dwm.cdwm.c

@@ -60,7 +60,7 @@ enum { CurNormal, CurResize, CurMove, CurLast }; /* cursor */

enum { ColBorder, ColFG, ColBG, ColLast }; /* color */ enum { NetSupported, NetWMName, NetWMState, NetWMFullscreen, NetActiveWindow, NetWMWindowType, - NetWMWindowTypeDialog, NetLast }; /* EWMH atoms */ + NetWMWindowTypeDialog, NetClientList, NetLast }; /* EWMH atoms */ enum { WMProtocols, WMDelete, WMState, WMTakeFocus, WMLast }; /* default atoms */ enum { ClkTagBar, ClkLtSymbol, ClkStatusText, ClkWinTitle, ClkClientWin, ClkRootWin, ClkLast }; /* clicks */

@@ -238,6 +238,7 @@ static void unmapnotify(XEvent *e);

static Bool updategeom(void); static void updatebarpos(Monitor *m); static void updatebars(void); +static void updateclientlist(void); static void updatenumlockmask(void); static void updatesizehints(Client *c); static void updatestatus(void);

@@ -1160,6 +1161,8 @@ if(c->isfloating)

XRaiseWindow(dpy, c->win); attach(c); attachstack(c); + XChangeProperty(dpy, root, netatom[NetClientList], XA_WINDOW, 32, PropModeAppend, + (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)

@@ -1621,6 +1624,7 @@ netatom[NetWMState] = XInternAtom(dpy, "_NET_WM_STATE", False);

netatom[NetWMFullscreen] = XInternAtom(dpy, "_NET_WM_STATE_FULLSCREEN", False); netatom[NetWMWindowType] = XInternAtom(dpy, "_NET_WM_WINDOW_TYPE", False); netatom[NetWMWindowTypeDialog] = XInternAtom(dpy, "_NET_WM_WINDOW_TYPE_DIALOG", False); + netatom[NetClientList] = XInternAtom(dpy, "_NET_CLIENT_LIST", False); /* init cursors */ cursor[CurNormal] = XCreateFontCursor(dpy, XC_left_ptr); cursor[CurResize] = XCreateFontCursor(dpy, XC_sizing);

@@ -1643,6 +1647,7 @@ updatestatus();

/* EWMH support per view */ XChangeProperty(dpy, root, netatom[NetSupported], XA_ATOM, 32, PropModeReplace, (unsigned char *) netatom, NetLast); + XDeleteProperty(dpy, root, netatom[NetClientList]); /* select for events */ wa.cursor = cursor[CurNormal]; wa.event_mask = SubstructureRedirectMask|SubstructureNotifyMask|ButtonPressMask|PointerMotionMask

@@ -1820,6 +1825,7 @@ XUngrabServer(dpy);

} free(c); focus(NULL); + updateclientlist(); arrange(m); }

@@ -1866,6 +1872,19 @@ m->wy = m->topbar ? m->wy + bh : m->wy;

} else m->by = -bh; +} + +void +updateclientlist() { + Client *c; + Monitor *m; + + XDeleteProperty(dpy, root, netatom[NetClientList]); + for(m = mons; m; m = m->next) + for(c = m->clients; c; c = c->next) + XChangeProperty(dpy, root, netatom[NetClientList], + XA_WINDOW, 32, PropModeAppend, + (unsigned char *) &(c->win), 1); } Bool