diff options
| author | Dana Jansens <danakj@orodu.net> | 2007-05-12 00:54:44 +0000 |
|---|---|---|
| committer | Dana Jansens <danakj@orodu.net> | 2007-05-12 00:54:44 +0000 |
| commit | 1d6c07c24be25b2de4d36dfb0cc6e5f2d3518bf8 (patch) | |
| tree | b42c0818ec9df188816ebff015e8709fecbc4864 /openbox/focus.c | |
| parent | 3bee91aaf9c9893fb4a516432ad195a117baf1ce (diff) | |
try catch weird racey corner case where we try fallback to a window but it unmaps as we do so, so focus ends up going to nowhere
Diffstat (limited to 'openbox/focus.c')
| -rw-r--r-- | openbox/focus.c | 7 |
1 files changed, 5 insertions, 2 deletions
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() |
