]> Dogcows Code - chaz/openbox/commitdiff
roll back focus fallback change, so it behaves well with new stacking
authorDana Jansens <danakj@orodu.net>
Mon, 12 Mar 2007 02:41:34 +0000 (02:41 +0000)
committerDana Jansens <danakj@orodu.net>
Mon, 12 Mar 2007 02:41:34 +0000 (02:41 +0000)
openbox/focus.c
openbox/focus.h
openbox/screen.c

index 7b40db5e585bd1a512a2980afeb96fe2a797e668..e73a312703bbd7b7984b0a5f00d4e9f38aed8dd9 100644 (file)
@@ -244,11 +244,14 @@ static ObClient* focus_fallback_transient(ObClient *top, ObClient *old)
         return NULL;
 }
 
-ObClient* focus_fallback_target(ObFocusFallbackType type, ObClient *old)
+ObClient* focus_fallback_target(ObFocusFallbackType type)
 {
     GList *it;
+    ObClient *old;
     ObClient *target = NULL;
 
+    old = focus_client;
+
     if ((type == OB_FOCUS_FALLBACK_UNFOCUSING
          || type == OB_FOCUS_FALLBACK_CLOSED) && old) {
         if (old->transient_for) {
@@ -257,8 +260,8 @@ ObClient* focus_fallback_target(ObFocusFallbackType type, ObClient *old)
             if (!config_focus_follow || config_focus_last)
                 trans = TRUE;
             else if ((target = client_under_pointer()) &&
-                     (client_search_transient
-                      (client_search_top_parent(target), old)))
+                     client_search_transient
+                     (client_search_top_parent(target), old))
                 trans = TRUE;
 
             /* try for transient relations */
@@ -337,7 +340,6 @@ ObClient* focus_fallback_target(ObFocusFallbackType type, ObClient *old)
 void focus_fallback(ObFocusFallbackType type)
 {
     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
@@ -345,7 +347,7 @@ void focus_fallback(ObFocusFallbackType type)
     */
     focus_set_client(NULL);
 
-    if ((new = focus_fallback_target(type, old)))
+    if ((new = focus_fallback_target(type)))
         client_focus(new);
 }
 
index 2846c9786a60cf7487a5e31d71b260fb692757bc..1c95faa046272848b19dd39591cc6b2291cf9191 100644 (file)
@@ -53,8 +53,7 @@ typedef enum {
     OB_FOCUS_FALLBACK_NOFOCUS     /*!< nothing has focus for some reason */
 } ObFocusFallbackType;
 
-struct _ObClient* focus_fallback_target(ObFocusFallbackType type,
-                                        struct _ObClient *old);
+struct _ObClient* focus_fallback_target(ObFocusFallbackType type);
 
 /*! Call this when you need to focus something! */
 void focus_fallback(ObFocusFallbackType type);
index 053757f7dde50258620ffec400dd0a14237549a8..0a5bf2d17f44138d6a0fcc229ffef8d2e53aee96 100644 (file)
@@ -465,7 +465,7 @@ void screen_set_desktop(guint num)
 
     event_ignore_queued_enters();
 
-    focus_hilite = focus_fallback_target(OB_FOCUS_FALLBACK_NOFOCUS, NULL);
+    focus_hilite = focus_fallback_target(OB_FOCUS_FALLBACK_NOFOCUS);
     if (focus_hilite) {
         frame_adjust_focus(focus_hilite->frame, TRUE);
 
This page took 0.027067 seconds and 4 git commands to generate.