diff options
| author | Dana Jansens <danakj@orodu.net> | 2009-12-17 15:43:46 -0500 |
|---|---|---|
| committer | Dana Jansens <danakj@orodu.net> | 2009-12-17 16:51:01 -0500 |
| commit | a067628051f5ee91f6e759ff85c8e31a7123d571 (patch) | |
| tree | 47abf901024bd8f80b207020cbe3567163a24129 /openbox/screen.c | |
| parent | 24f6b59fe36e06d06bd1139a99e08cb6e06d6682 (diff) | |
Hide the focus popup if we change desktops and one of the windows in it disappears
Diffstat (limited to 'openbox/screen.c')
| -rw-r--r-- | openbox/screen.c | 24 |
1 files changed, 16 insertions, 8 deletions
diff --git a/openbox/screen.c b/openbox/screen.c index 76ad1f27..d88be432 100644 --- a/openbox/screen.c +++ b/openbox/screen.c @@ -33,6 +33,7 @@ #include "frame.h" #include "event.h" #include "focus.h" +#include "focus_cycle.h" #include "popup.h" #include "extensions.h" #include "render/render.h" @@ -717,14 +718,21 @@ void screen_set_desktop(guint num, gboolean dofocus) for (it = g_list_last(stacking_list); it; it = g_list_previous(it)) { if (WINDOW_IS_CLIENT(it->data)) { ObClient *c = it->data; - if (client_hide(c) && c == focus_client) { - /* c was focused and we didn't do fallback clearly so make sure - openbox doesnt still consider the window focused. - this happens when using NextWindow with allDesktops, since - it doesnt want to move focus on desktop change, but the - focus is not going to stay with the current window, which - has now disappeared */ - focus_set_client(NULL); + if (client_hide(c)) { + /* in the middle of cycling..? kill it. */ + focus_cycle_stop(c); + + if (c == focus_client) { + /* c was focused and we didn't do fallback clearly so make + sure openbox doesnt still consider the window focused. + this happens when using NextWindow with allDesktops, + since it doesnt want to move focus on desktop change, + but the focus is not going to stay with the current + window, which has now disappeared. + only do this if the client was actually hidden, + otherwise it can keep focus. */ + focus_set_client(NULL); + } } } } |
