summaryrefslogtreecommitdiff
path: root/openbox/client.c
diff options
context:
space:
mode:
authorDana Jansens <danakj@orodu.net>2007-05-28 00:33:58 +0000
committerDana Jansens <danakj@orodu.net>2007-05-28 00:33:58 +0000
commit16fcb1213d4ccfccd4e4a8ad5e8b0c826dc5c16e (patch)
tree2cbd77bce08fa774a36b65070643a835e9178e97 /openbox/client.c
parent8874ec1fc4a142ea67d7c5a45ae9ea92ffdec5ea (diff)
when you focus a window, bring any modal children it has to that desktop
when falling back, return the window which actually was focused by client_focus let you focus cycle to windows when their modal window is on another desktop (it will be brought over)
Diffstat (limited to 'openbox/client.c')
-rw-r--r--openbox/client.c20
1 files changed, 15 insertions, 5 deletions
diff --git a/openbox/client.c b/openbox/client.c
index dbbba7de..477575a8 100644
--- a/openbox/client.c
+++ b/openbox/client.c
@@ -3463,6 +3463,8 @@ gboolean client_can_focus(ObClient *self)
gboolean client_focus(ObClient *self)
{
+ client_bring_modal_windows(self);
+
/* choose the correct target */
self = client_focus_target(self);
@@ -3582,15 +3584,18 @@ void client_activate(ObClient *self, gboolean here, gboolean user)
client_hilite(self, TRUE);
}
-static void client_bring_helper_windows_recursive(ObClient *self,
- guint desktop)
+static void client_bring_windows_recursive(ObClient *self,
+ guint desktop,
+ gboolean helpers,
+ gboolean modals)
{
GSList *it;
for (it = self->transients; it; it = g_slist_next(it))
- client_bring_helper_windows_recursive(it->data, desktop);
+ client_bring_windows_recursive(it->data, desktop, helpers, modals);
- if (client_helper(self) &&
+ if (((helpers && client_helper(self)) ||
+ (modals && self->modal))&&
self->desktop != desktop && self->desktop != DESKTOP_ALL)
{
client_set_desktop(self, desktop, FALSE);
@@ -3599,7 +3604,12 @@ static void client_bring_helper_windows_recursive(ObClient *self,
void client_bring_helper_windows(ObClient *self)
{
- client_bring_helper_windows_recursive(self, self->desktop);
+ client_bring_windows_recursive(self, self->desktop, TRUE, FALSE);
+}
+
+void client_bring_modal_windows(ObClient *self)
+{
+ client_bring_windows_recursive(self, self->desktop, FALSE, TRUE);
}
gboolean client_focused(ObClient *self)