]> Dogcows Code - chaz/openbox/commitdiff
fallback is still getting x errors. instead, fallback when the client iconifies,...
authorDana Jansens <danakj@orodu.net>
Mon, 12 Mar 2007 17:31:11 +0000 (17:31 +0000)
committerDana Jansens <danakj@orodu.net>
Mon, 12 Mar 2007 17:31:11 +0000 (17:31 +0000)
openbox/client.c
openbox/event.c

index be61a806e06e8eef98b2ea1801f37c8040dc9ced..b561f4e2a801b2b54e61b8cbb99255270dcec8b6 100644 (file)
@@ -2426,6 +2426,10 @@ static void client_iconify_recursive(ObClient *self,
                    bottom'. */
                 focus_order_to_top(self);
 
+                /* Fall back focus since we're disappearing */
+                if (focus_client == self)
+                    client_unfocus(self);
+
                 changed = TRUE;
             }
         } else {
@@ -2992,8 +2996,9 @@ gboolean client_focus(ObClient *self)
     return TRUE;
 }
 
-/* Used when the current client is closed, focus_last will then prevent
- * focus from going to the mouse pointer */
+/* Used when the current client is closed or otherwise hidden, focus_last will
+   then prevent focus from going to the mouse pointer
+*/
 void client_unfocus(ObClient *self)
 {
     if (focus_client == self) {
index 1f0d15595ff95d0eb2cb48f2db539a175cf4b829..ea8623abe60bf2109a8173704781d801fbddb1d9 100644 (file)
@@ -664,7 +664,7 @@ static void event_handle_client(ObClient *client, XEvent *e)
         /* Look for the followup FocusIn */
         if (!XCheckIfEvent(ob_display, &ce, look_for_focusin, NULL)) {
             /* There is no FocusIn, move focus where we can still hear events*/
-            focus_fallback(OB_FOCUS_FALLBACK_NOFOCUS);
+            focus_set_client(NULL);
         } else if (ce.xany.window == e->xany.window) {
             /* If focus didn't actually move anywhere, there is nothing to do*/
             break;
This page took 0.029598 seconds and 4 git commands to generate.