wmii

git clone git://oldgit.suckless.org/wmii/
Log | Files | Refs | README | LICENSE

commit cc4230899080d350c0a80a1727f3c95174c2128d
parent 5031b9d983559f8f7e288cf14b27dc2b7815b9e1
Author: Anselm R. Garbe <garbeam@wmii.de>
Date:   Sat, 13 May 2006 17:23:54 +0200

making class/inst handling more robust against borken clients


Diffstat:
cmd/wm/client.c | 11+++++++----
1 file changed, 7 insertions(+), 4 deletions(-)

diff --git a/cmd/wm/client.c b/cmd/wm/client.c @@ -69,10 +69,13 @@ create_client(Window w, XWindowAttributes *wa) XAddToSaveSet(dpy, c->win); update_client_name(c); if(XGetClassHint(dpy, c->win, &ch)) { - snprintf(c->classinst, sizeof(c->classinst), "%s:%s", ch.res_class, - ch.res_name); - XFree(ch.res_class); - XFree(ch.res_name); + snprintf(c->classinst, sizeof(c->classinst), "%s:%s", + ch.res_class ? ch.res_class : "", + ch.res_name ? ch.res_name : ""); + if(ch.res_class) + XFree(ch.res_class); + if(ch.res_name) + XFree(ch.res_name); } fwa.override_redirect = 1; fwa.background_pixmap = ParentRelative;