all repos — dwm @ 6d7285fd6e40508c35eadfdcc2b8940953cac06d

my dwm build

applied Martin Hurton's scan() patch with slight modifications
Anselm R Garbe garbeam@gmail.com
Mon, 18 Aug 2008 10:14:51 +0100
commit

6d7285fd6e40508c35eadfdcc2b8940953cac06d

parent

69c7b4b0baa19ef62ae514d06e8e870d87ab71b6

1 files changed, 3 insertions(+), 4 deletions(-)

jump to
M dwm.cdwm.c

@@ -1246,10 +1246,9 @@

void scan(void) { unsigned int i, num; - Window *wins, d1, d2; + Window d1, d2, *wins = NULL; XWindowAttributes wa; - wins = NULL; if(XQueryTree(dpy, root, &d1, &d2, &wins, &num)) { for(i = 0; i < num; i++) { if(!XGetWindowAttributes(dpy, wins[i], &wa)

@@ -1265,9 +1264,9 @@ if(XGetTransientForHint(dpy, wins[i], &d1)

&& (wa.map_state == IsViewable || getstate(wins[i]) == IconicState)) manage(wins[i], &wa); } + if(wins) + XFree(wins); } - if(wins) - XFree(wins); } void