remove the focus_nonintrusiev parameter and make it always nonintrusive - so windows...
authorDana Jansens <danakj@orodu.net>
Tue, 8 May 2007 17:59:41 +0000 (17:59 +0000)
committerDana Jansens <danakj@orodu.net>
Tue, 8 May 2007 17:59:41 +0000 (17:59 +0000)
openbox/action.c
openbox/client.c
openbox/client.h
openbox/event.c
openbox/screen.c

index f8e66439daffc41bc7969667804ff7c74efc647c..f8b2b7b3845175971043169876bd2b57fbcf7f63 100644 (file)
@@ -1351,7 +1351,7 @@ void action_toggle_omnipresent(union ActionData *data)
 { 
     client_set_desktop(data->client.any.c,
                        data->client.any.c->desktop == DESKTOP_ALL ?
-                       screen_desktop : DESKTOP_ALL, FALSE, FALSE);
+                       screen_desktop : DESKTOP_ALL, FALSE);
 }
 
 void action_move_relative_horz(union ActionData *data)
@@ -1515,7 +1515,7 @@ void action_send_to_desktop(union ActionData *data)
 
     if (data->sendto.desk < screen_num_desktops ||
         data->sendto.desk == DESKTOP_ALL) {
-        client_set_desktop(c, data->sendto.desk, data->sendto.follow, FALSE);
+        client_set_desktop(c, data->sendto.desk, data->sendto.follow);
         if (data->sendto.follow)
             screen_set_desktop(data->sendto.desk, TRUE);
     }
@@ -1582,7 +1582,7 @@ void action_send_to_desktop_dir(union ActionData *data)
         !data->sendtodir.inter.final ||
         data->sendtodir.inter.cancel)
     {
-        client_set_desktop(c, d, data->sendtodir.follow, FALSE);
+        client_set_desktop(c, d, data->sendtodir.follow);
         if (data->sendtodir.follow)
             screen_set_desktop(d, TRUE);
     }
index c872bbc9224fb1736b74fc085518802def35a284..529049a8e20302e1c99bbb9f4d5466b31716fd65 100644 (file)
@@ -2813,7 +2813,7 @@ static void client_iconify_recursive(ObClient *self,
 
             if (curdesk && self->desktop != screen_desktop &&
                 self->desktop != DESKTOP_ALL)
-                client_set_desktop(self, screen_desktop, FALSE, FALSE);
+                client_set_desktop(self, screen_desktop, FALSE);
 
             /* this puts it after the current focused window */
             focus_order_remove(self);
@@ -2994,8 +2994,7 @@ void client_hilite(ObClient *self, gboolean hilite)
 
 void client_set_desktop_recursive(ObClient *self,
                                   guint target,
-                                  gboolean donthide,
-                                  gboolean focus_nonintrusive)
+                                  gboolean donthide)
 {
     guint old;
     GSList *it;
@@ -3006,10 +3005,6 @@ void client_set_desktop_recursive(ObClient *self,
 
         g_assert(target < screen_num_desktops || target == DESKTOP_ALL);
 
-        /* remove from the old desktop(s) */
-        if (!focus_nonintrusive)
-            focus_order_remove(self);
-
         old = self->desktop;
         self->desktop = target;
         PROP_SET32(self->window, net_wm_desktop, cardinal, target);
@@ -3024,14 +3019,6 @@ void client_set_desktop_recursive(ObClient *self,
         if (STRUT_EXISTS(self->strut))
             screen_update_areas();
 
-        /* add to the new desktop(s) */
-        if (!focus_nonintrusive) {
-            if (config_focus_new)
-                focus_order_to_top(self);
-            else
-                focus_order_to_bottom(self);
-        }
-
         /* call the notifies */
         GSList *it;
         for (it = client_desktop_notifies; it; it = g_slist_next(it)) {
@@ -3044,15 +3031,14 @@ void client_set_desktop_recursive(ObClient *self,
     for (it = self->transients; it; it = g_slist_next(it))
         if (it->data != self)
             if (client_is_direct_child(self, it->data))
-                client_set_desktop_recursive(it->data, target,
-                                             donthide, focus_nonintrusive);
+                client_set_desktop_recursive(it->data, target, donthide);
 }
 
 void client_set_desktop(ObClient *self, guint target,
-                        gboolean donthide, gboolean focus_nonintrusive)
+                        gboolean donthide)
 {
     self = client_search_top_normal_parent(self);
-    client_set_desktop_recursive(self, target, donthide, focus_nonintrusive);
+    client_set_desktop_recursive(self, target, donthide);
 }
 
 gboolean client_is_direct_child(ObClient *parent, ObClient *child)
@@ -3394,7 +3380,7 @@ static void client_present(ObClient *self, gboolean here, gboolean raise)
         self->desktop != screen_desktop)
     {
         if (here)
-            client_set_desktop(self, screen_desktop, FALSE, FALSE);
+            client_set_desktop(self, screen_desktop, FALSE);
         else
             screen_set_desktop(self->desktop, FALSE);
     } else if (!self->frame->visible)
@@ -3460,7 +3446,7 @@ static void client_bring_helper_windows_recursive(ObClient *self,
     if (client_helper(self) &&
         self->desktop != desktop && self->desktop != DESKTOP_ALL)
     {
-        client_set_desktop(self, desktop, FALSE, TRUE);
+        client_set_desktop(self, desktop, FALSE);
     }
 }
 
index ae60181c8b3f6113e6a2a453bc2dfef9b394f774..ede581a738759e2f1c56e703a9646b308d8ed548 100644 (file)
@@ -464,13 +464,9 @@ void client_kill(ObClient *self);
 
 /*! Sends the window to the specified desktop
   @param donthide If TRUE, the window will not be shown/hidden after its
-         desktop has been changed. Generally this should be FALSE.
-  @param focus_nonintrusive If TRUE, the window will not be moved in the
-         focus order at all. Do this when moving windows to a desktop in
-         the "background" or something. It can be used to make a window share
-         multiple desktops. Generally this should be FALSE. */
-void client_set_desktop(ObClient *self, guint target,
-                        gboolean donthide, gboolean focus_nonintrusive);
+                  desktop has been changed. Generally this should be FALSE.
+*/
+void client_set_desktop(ObClient *self, guint target, gboolean donthide);
 
 /*! Show the client if it should be shown. */
 void client_show(ObClient *self);
index ace3e86177821978ed41e606cf87c955992855e8..9a25ce62a25d8cbcfd2b561e2283b13a69b7d243 100644 (file)
@@ -1025,7 +1025,7 @@ static void event_handle_client(ObClient *client, XEvent *e)
             if ((unsigned)e->xclient.data.l[0] < screen_num_desktops ||
                 (unsigned)e->xclient.data.l[0] == DESKTOP_ALL)
                 client_set_desktop(client, (unsigned)e->xclient.data.l[0],
-                                   FALSE, FALSE);
+                                   FALSE);
         } else if (msgtype == prop_atoms.net_wm_state) {
             /* can't compress these */
             ob_debug("net_wm_state %s %ld %ld for 0x%lx\n",
index 19e18a219c1855d349cb1d08686a53e4a6a755c5..d48d0dda2284fc6b1ec80cd1bfcf7a8de93ff3cb 100644 (file)
@@ -438,7 +438,7 @@ void screen_set_num_desktops(guint num)
     for (it = client_list; it; it = g_list_next(it)) {
         ObClient *c = it->data;
         if (c->desktop >= num && c->desktop != DESKTOP_ALL)
-            client_set_desktop(c, num - 1, FALSE, FALSE);
+            client_set_desktop(c, num - 1, FALSE);
     }
  
     /* change our struts/area to match (after moving windows) */
@@ -473,7 +473,7 @@ void screen_set_desktop(guint num, gboolean dofocus)
     ob_debug("Moving to desktop %d\n", num+1);
 
     if (moveresize_client)
-        client_set_desktop(moveresize_client, num, TRUE, FALSE);
+        client_set_desktop(moveresize_client, num, TRUE);
 
     /* show windows before hiding the rest to lessen the enter/leave events */