]> Dogcows Code - chaz/openbox/commitdiff
when focusing nothing, make sure focus_client knows that nothing is focused
authorDana Jansens <danakj@orodu.net>
Sun, 22 Apr 2007 20:33:12 +0000 (20:33 +0000)
committerDana Jansens <danakj@orodu.net>
Sun, 22 Apr 2007 20:33:12 +0000 (20:33 +0000)
openbox/focus.c

index afedd0008f840330b8dc0365c9002e877a0a6fb0..f794e4666c245ea1a8858c6bd28d2c2d0695cc3f 100644 (file)
@@ -259,6 +259,7 @@ ObClient* focus_fallback_target(gboolean allow_refocus, ObClient *old)
 void focus_fallback(gboolean allow_refocus)
 {
     ObClient *new;
+    ObClient *old = focus_client;
 
     /* unfocus any focused clients.. they can be focused by Pointer events
        and such, and then when I try focus them, I won't get a FocusIn event
@@ -266,7 +267,7 @@ void focus_fallback(gboolean allow_refocus)
     */
     focus_nothing();
 
-    if ((new = focus_fallback_target(allow_refocus, focus_client)))
+    if ((new = focus_fallback_target(allow_refocus, old)))
         client_focus(new);
 }
 
@@ -278,6 +279,8 @@ void focus_nothing()
         screen_install_colormap(NULL, TRUE);
     }
 
+    focus_client = NULL;
+
     /* when nothing will be focused, send focus to the backup target */
     XSetInputFocus(ob_display, screen_support_win, RevertToPointerRoot,
                    event_curtime);
This page took 0.025889 seconds and 4 git commands to generate.