[hackers] [dwm] applied Martin Hurton's scan() patch with slight modifications || Anselm R Garbe

From: <hg_AT_suckless.org>
Date: Mon, 18 Aug 2008 09:14:55 +0000 (UTC)

changeset: 1330:06677766e7aa
tag: tip
user: Anselm R Garbe <garbeam_AT_gmail.com>
date: Mon Aug 18 10:14:51 2008 +0100
files: dwm.c
description:
applied Martin Hurton's scan() patch with slight modifications

diff -r 43c19f9f8e6f -r 06677766e7aa dwm.c
--- a/dwm.c Mon Aug 18 10:00:10 2008 +0100
+++ b/dwm.c Mon Aug 18 10:14:51 2008 +0100
@@ -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 @@
                         && (wa.map_state == IsViewable || getstate(wins[i]) == IconicState))
                                 manage(wins[i], &wa);
                 }
+ if(wins)
+ XFree(wins);
         }
- if(wins)
- XFree(wins);
 }
 
 void
Received on Mon Aug 18 2008 - 09:14:55 UTC

This archive was generated by hypermail 2.2.0 : Mon Aug 18 2008 - 09:24:08 UTC