summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDana Jansens <danakj@orodu.net>2007-05-22 18:20:17 +0000
committerDana Jansens <danakj@orodu.net>2007-05-22 18:20:17 +0000
commitbf9cbd07e8d125637f7c91df587c0fb57da85822 (patch)
treea216bd4f86cc567c94009235372d94d6b82b2a01
parentdd937208e6b6a3ea7a420345f0f60ab73f30d144 (diff)
make modal windows cyclable all the time if they are visible and stuff
-rw-r--r--openbox/focus_cycle.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/openbox/focus_cycle.c b/openbox/focus_cycle.c
index 9c64cdb9..4c0630b3 100644
--- a/openbox/focus_cycle.c
+++ b/openbox/focus_cycle.c
@@ -124,7 +124,9 @@ gboolean focus_cycle_target_valid(ObClient *ft,
if (dock_windows || desktop_windows)
ok = ok && ((dock_windows && ft->type == OB_CLIENT_TYPE_DOCK) ||
(desktop_windows && ft->type == OB_CLIENT_TYPE_DESKTOP));
- else
+ /* modal windows are important and can always get focus if they are
+ visible and stuff, so don't change 'ok' based on their type */
+ else if (!ft->modal)
/* normal non-helper windows are valid targets */
ok = ok &&
((client_normal(ft) && !client_helper(ft))
@@ -138,12 +140,13 @@ gboolean focus_cycle_target_valid(ObClient *ft,
!focus_target_has_siblings(ft, iconic_windows, all_desktops))));
/* it's not set to skip the taskbar (unless it is a type that would be
- expected to set this hint */
+ expected to set this hint, or modal) */
ok = ok && ((ft->type == OB_CLIENT_TYPE_DOCK ||
ft->type == OB_CLIENT_TYPE_DESKTOP ||
ft->type == OB_CLIENT_TYPE_TOOLBAR ||
ft->type == OB_CLIENT_TYPE_MENU ||
ft->type == OB_CLIENT_TYPE_UTILITY) ||
+ ft->modal ||
!ft->skip_taskbar);
/* it's not going to just send fous off somewhere else (modal window) */