From f4cd54bcc9db24972087bfdf4279f64d97dc2065 Mon Sep 17 00:00:00 2001 From: Dana Jansens Date: Sun, 3 Jun 2007 22:54:08 +0000 Subject: [PATCH] missed merges --- openbox/client.c | 20 +++++++++++++------- openbox/event.c | 2 +- openbox/focus.c | 6 +++--- 3 files changed, 17 insertions(+), 11 deletions(-) diff --git a/openbox/client.c b/openbox/client.c index 74764e93..daa65379 100644 --- a/openbox/client.c +++ b/openbox/client.c @@ -3639,29 +3639,35 @@ void client_activate(ObClient *self, gboolean here, gboolean user) static void client_bring_windows_recursive(ObClient *self, guint desktop, gboolean helpers, - gboolean modals) + gboolean modals, + gboolean iconic) { GSList *it; for (it = self->transients; it; it = g_slist_next(it)) - client_bring_windows_recursive(it->data, desktop, helpers, modals); + client_bring_windows_recursive(it->data, desktop, + helpers, modals, iconic); if (((helpers && client_helper(self)) || - (modals && self->modal))&& - self->desktop != desktop && self->desktop != DESKTOP_ALL) + (modals && self->modal)) && + ((self->desktop != desktop && self->desktop != DESKTOP_ALL) || + (iconic && self->iconic))) { - client_set_desktop(self, desktop, FALSE); + if (iconic && self->iconic) + client_iconify(self, FALSE, TRUE, FALSE); + else + client_set_desktop(self, desktop, FALSE); } } void client_bring_helper_windows(ObClient *self) { - client_bring_windows_recursive(self, self->desktop, TRUE, FALSE); + client_bring_windows_recursive(self, self->desktop, TRUE, FALSE, FALSE); } void client_bring_modal_windows(ObClient *self) { - client_bring_windows_recursive(self, self->desktop, FALSE, TRUE); + client_bring_windows_recursive(self, self->desktop, FALSE, TRUE, TRUE); } gboolean client_focused(ObClient *self) diff --git a/openbox/event.c b/openbox/event.c index 346adcbf..9f1146a3 100644 --- a/openbox/event.c +++ b/openbox/event.c @@ -551,7 +551,7 @@ static void event_process(const XEvent *ec, gpointer data) */ if (!focus_left_screen) - focus_fallback(TRUE, FALSE); + focus_fallback(FALSE, FALSE); } } else if (!client) diff --git a/openbox/focus.c b/openbox/focus.c index d60f5ac8..93058d55 100644 --- a/openbox/focus.c +++ b/openbox/focus.c @@ -105,7 +105,7 @@ static ObClient* focus_fallback_target(gboolean allow_refocus, ob_debug_type(OB_DEBUG_FOCUS, "trying pointer stuff\n"); if (allow_pointer && config_focus_follow) if ((c = client_under_pointer()) && - (allow_refocus || c != old) && + (allow_refocus || client_focus_target(c) != old) && (client_normal(c) && client_focus(c))) { @@ -125,7 +125,7 @@ static ObClient* focus_fallback_target(gboolean allow_refocus, */ if (c->desktop == screen_desktop && client_normal(c) && - (allow_refocus || c != old) && + (allow_refocus || client_focus_target(c) != old) && client_focus(c)) { ob_debug_type(OB_DEBUG_FOCUS, "found in focus order\n"); @@ -144,7 +144,7 @@ static ObClient* focus_fallback_target(gboolean allow_refocus, backup fallback though) */ if (c->type == OB_CLIENT_TYPE_DESKTOP && - (allow_refocus || c != old) && + (allow_refocus || client_focus_target(c) != old) && client_focus(c)) { ob_debug_type(OB_DEBUG_FOCUS, "found a desktop window\n"); -- 2.34.1