[hackers] [wmii] Fix a segfault.

From: Kris Maglione <jg_AT_suckless.org>
Date: Sat Feb 17 19:25:11 2007

changeset: 1896:37c070dfa964
tag: tip
user: Kris Maglione <jg_AT_suckless.org>
date: Sat Feb 17 13:22:52 2007 -0500
summary: Fix a segfault.

diff -r e5225ca4ac61 -r 37c070dfa964 client.c
--- a/client.c Sat Feb 17 13:14:20 2007 -0500
+++ b/client.c Sat Feb 17 13:22:52 2007 -0500
@@ -555,13 +555,14 @@ focus_client(Client *c) {
         if(verbose)
                 fprintf(stderr, "focus_client(%p) => %s\n", c, (c ? c->name : nil));
         if(screen->focus != c) {
- update_client_grab(c);
+ if(c)
                 if(verbose)
                         fprintf(stderr, "\t%s => %s\n", (screen->focus ? screen->focus->name : "<nil>"),
                                         (c ? c->name : "<nil>"));
- if(c)
+ if(c) {
                         XSetInputFocus(blz.dpy, c->win, RevertToParent, CurrentTime);
- else
+ update_client_grab(c);
+ }else
                         XSetInputFocus(blz.dpy, screen->barwin, RevertToParent, CurrentTime);
         }
 }
Received on Sat Feb 17 2007 - 19:25:11 UTC

This archive was generated by hypermail 2.2.0 : Sun Jul 13 2008 - 15:55:24 UTC