X-Git-Url: https://git.dogcows.com/gitweb?a=blobdiff_plain;f=openbox%2Ffocus_cycle.c;h=7549fbe51e2dce5905a976ff1dadcf360d9f9dae;hb=be3b78736fc171da4f14c99a22b858ad03237fd8;hp=46f5f058daff1bf5424973dec9693807ff5708e2;hpb=aa7c36d1bc78529feafb65c2fd6e251a86043d81;p=chaz%2Fopenbox diff --git a/openbox/focus_cycle.c b/openbox/focus_cycle.c index 46f5f058..7549fbe5 100644 --- a/openbox/focus_cycle.c +++ b/openbox/focus_cycle.c @@ -149,8 +149,17 @@ gboolean focus_cycle_target_valid(ObClient *ft, ft->modal || !ft->skip_taskbar); - /* it's not going to just send fous off somewhere else (modal window) */ - ok = ok && ft == client_focus_target(ft); + /* it's not going to just send focus off somewhere else (modal window), + unless that modal window is not one of our valid targets, then let + you choose this window and bring the modal one here */ + { + ObClient *cft = client_focus_target(ft); + ok = ok && (ft == cft || !focus_cycle_target_valid(cft, + iconic_windows, + all_desktops, + dock_windows, + desktop_windows)); + } return ok; }