all repos — openbox @ fe317164865f5a08e18bb0b4fa9519fa4ca48a45

openbox fork - make it a bit more like ryudo

fallback to transient parents properly
Dana Jansens danakj@orodu.net
commit

fe317164865f5a08e18bb0b4fa9519fa4ca48a45

parent

62a39c4c70b0ed8e153b0cccac853cc6fded99ba

3 files changed, 6 insertions(+), 7 deletions(-)

jump to
M openbox/focus.copenbox/focus.c

@@ -244,13 +244,10 @@ else

return NULL; } -ObClient* focus_fallback_target(ObFocusFallbackType type) +ObClient* focus_fallback_target(ObFocusFallbackType type, ObClient *old) { GList *it; - ObClient *old = NULL; ObClient *target = NULL; - - old = focus_client; if ((type == OB_FOCUS_FALLBACK_UNFOCUSING || type == OB_FOCUS_FALLBACK_CLOSED) && old) {

@@ -336,6 +333,7 @@

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

@@ -343,7 +341,7 @@ at all for them.

*/ focus_set_client(NULL); - if ((new = focus_fallback_target(type))) + if ((new = focus_fallback_target(type, old))) client_focus(new); }
M openbox/focus.hopenbox/focus.h

@@ -53,7 +53,8 @@ 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* focus_fallback_target(ObFocusFallbackType type, + struct _ObClient *old); /*! Call this when you need to focus something! */ void focus_fallback(ObFocusFallbackType type);
M openbox/screen.copenbox/screen.c

@@ -465,7 +465,7 @@ }

event_ignore_queued_enters(); - focus_hilite = focus_fallback_target(OB_FOCUS_FALLBACK_NOFOCUS); + focus_hilite = focus_fallback_target(OB_FOCUS_FALLBACK_NOFOCUS, NULL); if (focus_hilite) { frame_adjust_focus(focus_hilite->frame, TRUE);