summaryrefslogtreecommitdiff
path: root/openbox/focus_cycle.c
diff options
context:
space:
mode:
authorDana Jansens <danakj@orodu.net>2007-05-28 00:38:44 +0000
committerDana Jansens <danakj@orodu.net>2007-05-28 00:38:44 +0000
commit461ae2a83349b7574df5e65e8238704f414891d1 (patch)
tree1da8f2e15f547737c3c2667ef4ac13d2270a484c /openbox/focus_cycle.c
parente48dce6707b9273eaa46957624932288317a30da (diff)
add a comment and make it smarter about when to let you focus cycle to windows with modal children
Diffstat (limited to 'openbox/focus_cycle.c')
-rw-r--r--openbox/focus_cycle.c11
1 files changed, 8 insertions, 3 deletions
diff --git a/openbox/focus_cycle.c b/openbox/focus_cycle.c
index 74cabac6..7549fbe5 100644
--- a/openbox/focus_cycle.c
+++ b/openbox/focus_cycle.c
@@ -149,11 +149,16 @@ 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) */
+ /* 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 || (cft->desktop != DESKTOP_ALL &&
- cft->desktop != ft->desktop));
+ ok = ok && (ft == cft || !focus_cycle_target_valid(cft,
+ iconic_windows,
+ all_desktops,
+ dock_windows,
+ desktop_windows));
}
return ok;