diff options
author | oga | 2009-01-15 17:23:12 +0000 |
---|---|---|
committer | oga | 2009-01-15 17:23:12 +0000 |
commit | f069a19b033cc9adb37dea328d36f15bcdc0c892 (patch) | |
tree | bf314c43a3cf5b9537399489e2c0d1c6ac9e5a5b /calmwm.c | |
parent | 4ea881a1f870bea94491fb83611d469364f0c227 (diff) | |
download | cwm-f069a19b033cc9adb37dea328d36f15bcdc0c892.tar.gz |
On startup, don't leak memory when we enumerate existing windows.
The behaviour until now was to ask X for the windows name (which is
malloced) then drop that on the floor and do nothing with it. Skip this
foolery and just skip the window. I don't believe I never noticed this before!
"you can has ok" okan@
Diffstat (limited to '')
-rw-r--r-- | calmwm.c | 7 |
1 files changed, 2 insertions, 5 deletions
@@ -15,7 +15,7 @@ * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. * - * $Id: calmwm.c,v 1.31 2008/12/03 23:55:46 oga Exp $ + * $Id: calmwm.c,v 1.32 2009/01/15 17:23:12 oga Exp $ */ #include "headers.h" @@ -229,11 +229,8 @@ x_setupscreen(struct screen_ctx *sc, u_int which) for (i = 0; i < nwins; i++) { XGetWindowAttributes(X_Dpy, wins[i], &winattr); if (winattr.override_redirect || - winattr.map_state != IsViewable) { - char *name; - XFetchName(X_Dpy, wins[i], &name); + winattr.map_state != IsViewable) continue; - } client_new(wins[i], sc, winattr.map_state != IsUnmapped); } XFree(wins); |