]> Dogcows Code - chaz/openbox/commitdiff
make activate take a here parameter
authorDana Jansens <danakj@orodu.net>
Thu, 14 Aug 2003 05:57:45 +0000 (05:57 +0000)
committerDana Jansens <danakj@orodu.net>
Thu, 14 Aug 2003 05:57:45 +0000 (05:57 +0000)
openbox/client.c
openbox/client.h
openbox/event.c
openbox/focus.c

index 41bd57f887714530119dcba93434e0b5dca46e12..a1deded5a06fcb790e2a7bdc7d3a4d41ef42cd1d 100644 (file)
@@ -2533,16 +2533,19 @@ void client_unfocus(ObClient *self)
     focus_fallback(OB_FOCUS_FALLBACK_UNFOCUSING);
 }
 
-void client_activate(ObClient *self)
+void client_activate(ObClient *self, gboolean here)
 {
     if (client_normal(self) && screen_showing_desktop)
         screen_show_desktop(FALSE);
     if (self->iconic)
         client_iconify(self, FALSE, FALSE);
     if (self->desktop != DESKTOP_ALL &&
-        self->desktop != screen_desktop)
-        screen_set_desktop(self->desktop);
-    else if (!self->frame->visible)
+        self->desktop != screen_desktop) {
+        if (here)
+            client_set_desktop(self, screen_desktop, FALSE);
+        else
+            screen_set_desktop(self->desktop);
+    } else if (!self->frame->visible)
         /* if its not visible for other reasons, then don't mess
            with it */
         return;
index dba6786e48dda7f393a31fa2b9bb789573def4f0..080225cfaf3a8adcfbe85ad02fb6bf9fb6ef2c38 100644 (file)
@@ -395,8 +395,11 @@ gboolean client_focus(ObClient *self);
 void client_unfocus(ObClient *self);
 
 /*! Activates the client for use, focusing, uniconifying it, etc. To be used
-  when the user deliberately selects a window for use. */
-void client_activate(ObClient *self);
+  when the user deliberately selects a window for use.
+  @param here If true, then the client is brought to the current desktop;
+              otherwise, the desktop is changed to where the client lives.
+*/
+void client_activate(ObClient *self, gboolean here);
 
 /*! Calculates the stacking layer for the client window */
 void client_calc_layer(ObClient *self);
index 97f01fb6f3d305424c055a21c196ac75d022761c..ed0e0965b733d41b4b55b726c758f9629d0a46e7 100644 (file)
@@ -939,7 +939,7 @@ static void event_handle_client(ObClient *client, XEvent *e)
            client_close(client);
        } else if (msgtype == prop_atoms.net_active_window) {
            ob_debug("net_active_window for 0x%lx\n", client->window);
-            client_activate(client);
+            client_activate(client, FALSE);
        } else if (msgtype == prop_atoms.net_wm_moveresize) {
            ob_debug("net_wm_moveresize for 0x%lx\n", client->window);
             if ((Atom)e->xclient.data.l[2] ==
index 9949dea3a68fb337ad79a025e75b5985450d45ed..3bb0ae8e569c452358d21a0ce6a8492988a0e4b9 100644 (file)
@@ -278,7 +278,7 @@ ObClient *focus_cycle(gboolean forward, gboolean linear, gboolean done,
         goto done_cycle;
     } else if (done) {
         if (focus_cycle_target)
-            client_activate(focus_cycle_target);
+            client_activate(focus_cycle_target, FALSE);
         goto done_cycle;
     }
 
This page took 0.031473 seconds and 4 git commands to generate.