- /* 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));
+ }