focus_client was becoming invalid if the focused client was unmanaged.
authorDana Jansens <danakj@orodu.net>
Mon, 23 Apr 2007 23:11:33 +0000 (23:11 +0000)
committerDana Jansens <danakj@orodu.net>
Mon, 23 Apr 2007 23:11:33 +0000 (23:11 +0000)
openbox/client.c
openbox/focus.c

index 5471bed..c184c89 100644 (file)
@@ -525,7 +525,6 @@ void client_unmanage(ObClient *self)
         event_ignore_queued_enters();
     }
 
-
     keyboard_grab_for_client(self, FALSE);
     mouse_grab_for_client(self, FALSE);
 
index 4c663c3..788e168 100644 (file)
@@ -763,6 +763,8 @@ void focus_order_add_new(ObClient *c)
 void focus_order_remove(ObClient *c)
 {
     focus_order = g_list_remove(focus_order, c);
+    if (c == focus_client)
+        focus_client = NULL;
 }
 
 void focus_order_to_top(ObClient *c)