]> Dogcows Code - chaz/openbox/commitdiff
focus_client is already nulled from the fallback, and use client_focused for niceness...
authorDana Jansens <danakj@orodu.net>
Thu, 26 Apr 2007 06:14:09 +0000 (06:14 +0000)
committerDana Jansens <danakj@orodu.net>
Thu, 26 Apr 2007 06:14:09 +0000 (06:14 +0000)
openbox/client.c

index 7fcc0668f30685085ecd03574a61625a1bbdc99a..13e239d3c728d363fe63258c87c577fed2c6cfe2 100644 (file)
@@ -493,7 +493,7 @@ void client_unmanage(ObClient *self)
 
     /* update the focus lists */
     focus_order_remove(self);
 
     /* update the focus lists */
     focus_order_remove(self);
-    if (self == focus_client) {
+    if (client_focused(self)) {
         /* we have to fall back here because we might not get a focus out.
            1. we need to xselectinput off the window before we unmap it because
            otherwise we end up getting unmapnotifies we don't want and they
         /* we have to fall back here because we might not get a focus out.
            1. we need to xselectinput off the window before we unmap it because
            otherwise we end up getting unmapnotifies we don't want and they
@@ -503,11 +503,13 @@ void client_unmanage(ObClient *self)
               get the focusout event.
            3. we can't handle focusin events on the root window because they
               come from all screens, so the focus change gets lost
               get the focusout event.
            3. we can't handle focusin events on the root window because they
               come from all screens, so the focus change gets lost
+
+           if this ever gets removed in the future MAKE SURE to replace it
+           with:
+           /- don't leave an invalid focus_client -/
+           focus_client = NULL;
         */
         focus_fallback(FALSE);
         */
         focus_fallback(FALSE);
-
-        /* don't leave an invalid focus_client */
-        focus_client = NULL;
     }
 
     client_list = g_list_remove(client_list, self);
     }
 
     client_list = g_list_remove(client_list, self);
This page took 0.030931 seconds and 4 git commands to generate.