]> Dogcows Code - chaz/openbox/commitdiff
a) set the focus client before calculating its layer
authorDana Jansens <danakj@orodu.net>
Sun, 22 Apr 2007 19:35:50 +0000 (19:35 +0000)
committerDana Jansens <danakj@orodu.net>
Sun, 22 Apr 2007 19:35:50 +0000 (19:35 +0000)
b) cleanup in focus.c

openbox/event.c
openbox/focus.c

index c8356be1744aa1c059eb8e69b4a17c0d017b3e80..f276a07921f8c66a0f8d223078cdb43f97cb80cb 100644 (file)
@@ -471,8 +471,8 @@ static void event_process(const XEvent *ec, gpointer data)
             focus_fallback(TRUE);
         } else if (client && client != focus_client) {
             frame_adjust_focus(client->frame, TRUE);
-            client_calc_layer(client);
             focus_set_client(client);
+            client_calc_layer(client);
         }
     } else if (e->type == FocusOut) {
         gboolean nomove = FALSE;
index 7a686800de9ea81d5ac01f5004107d4c49b47f22..afedd0008f840330b8dc0365c9002e877a0a6fb0 100644 (file)
@@ -259,10 +259,6 @@ ObClient* focus_fallback_target(gboolean allow_refocus, ObClient *old)
 void focus_fallback(gboolean allow_refocus)
 {
     ObClient *new;
-    ObClient *old;
-
-    /* save this before moving focus away to nothing */
-    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
@@ -270,7 +266,7 @@ void focus_fallback(gboolean allow_refocus)
     */
     focus_nothing();
 
-    if ((new = focus_fallback_target(allow_refocus, old)))
+    if ((new = focus_fallback_target(allow_refocus, focus_client)))
         client_focus(new);
 }
 
This page took 0.028779 seconds and 4 git commands to generate.