missed merges
authorDana Jansens <danakj@orodu.net>
Sun, 3 Jun 2007 22:54:08 +0000 (22:54 +0000)
committerDana Jansens <danakj@orodu.net>
Sun, 3 Jun 2007 22:54:08 +0000 (22:54 +0000)
openbox/client.c
openbox/event.c
openbox/focus.c

index 74764e93310ea76a492417dfc91d44377c1d6d5a..daa65379f3d50e4201a60c7ea0f91976c3ed7126 100644 (file)
@@ -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)
index 346adcbfb35d51400168ae61abc358a169084a54..9f1146a323bdff759e2c08d8bb4dc6ef442898a6 100644 (file)
@@ -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)
index d60f5ac8d5a2e5be2921a41da74b24c71dc33be1..93058d555fe7bcf0f4b73eaa510522e86ffffb19 100644 (file)
@@ -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");