X-Git-Url: https://git.dogcows.com/gitweb?a=blobdiff_plain;f=openbox%2Ffocus.c;h=393ec98eaf0e0b3bd478df5b8b034e66c806e190;hb=d3ecb7c127edc6fd16059f786818bde71b9540a7;hp=a4d3f9f2d187853c211f6fb38e7f268d9e45a076;hpb=ba6754ac88b48c652639aec56498cb23b422bafa;p=chaz%2Fopenbox diff --git a/openbox/focus.c b/openbox/focus.c index a4d3f9f2..393ec98e 100644 --- a/openbox/focus.c +++ b/openbox/focus.c @@ -255,7 +255,7 @@ ObClient* focus_fallback_target(gboolean allow_refocus, ObClient *old) return desktop; } -void focus_fallback(gboolean allow_refocus) +ObClient* focus_fallback(gboolean allow_refocus) { ObClient *new; ObClient *old = focus_client; @@ -266,8 +266,11 @@ void focus_fallback(gboolean allow_refocus) */ focus_nothing(); - if ((new = focus_fallback_target(allow_refocus, old))) + if ((new = focus_fallback_target(allow_refocus, old))) { client_focus(new); + return new; + } else + return NULL; } void focus_nothing()