]> Dogcows Code - chaz/openbox/commitdiff
debug print in focus.c
authorDana Jansens <danakj@orodu.net>
Fri, 25 May 2007 15:02:20 +0000 (15:02 +0000)
committerDana Jansens <danakj@orodu.net>
Fri, 25 May 2007 15:02:20 +0000 (15:02 +0000)
when focus goes to something that isn't a client (window already unmapped) then set focus_client to NULL so we know nothing has focus right now

openbox/event.c
openbox/focus.c

index 6e11f82eac819dcf8fff9addb8c10e8f27c723fd..868712c1fe53209ea28322b007e22315251a4a36 100644 (file)
@@ -526,7 +526,10 @@ static void event_process(const XEvent *ec, gpointer data)
 
             /* If you send focus to a window and then it disappears, you can
                get the FocusIn for it, after it is unmanaged.
-               Just wait for the next FocusOut/FocusIn pair. */
+               Just wait for the next FocusOut/FocusIn pair, but note that
+               nothing is focused now.
+            */
+            focus_set_client(NULL);
         }
         else if (client != focus_client) {
             focus_left_screen = FALSE;
index ae0294af53bb20ca8107d8eb42db59b4d10019d2..0f399be73e02a21e2817df2ec8fe4ea570a21b17 100644 (file)
@@ -146,8 +146,9 @@ static ObClient* focus_fallback_target(gboolean allow_refocus, ObClient *old,
              /* if not just see if we could try, or it's already focused */
              (!send_focus && (c == old || client_can_focus(c)))))
         {
-            ob_debug_type(OB_DEBUG_FOCUS, "found in focus order (%d)\n",
-                          send_focus);
+            ob_debug_type(OB_DEBUG_FOCUS, "found in focus order (%d) 0x%x "
+                          "from 0x%x\n",
+                          send_focus, c, old);
             return c;
         }
     }
This page took 0.026399 seconds and 4 git commands to generate.