roll back focus fallback change, so it behaves well with new stacking
Dana Jansens danakj@orodu.net
3 files changed,
9 insertions(+),
8 deletions(-)
M
openbox/focus.c
→
openbox/focus.c
@@ -244,10 +244,13 @@ else
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) {@@ -257,8 +260,8 @@
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 @@
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 @@ at all for them.
*/ focus_set_client(NULL); - if ((new = focus_fallback_target(type, old))) + if ((new = focus_fallback_target(type))) client_focus(new); }
M
openbox/focus.h
→
openbox/focus.h
@@ -53,8 +53,7 @@ OB_FOCUS_FALLBACK_CLOSED, /*!< closed the window with focus */
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);
M
openbox/screen.c
→
openbox/screen.c
@@ -465,7 +465,7 @@ }
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);