]> Dogcows Code - chaz/openbox/commitdiff
cleanup, and don't send windows to desktop if they are already there
authorDana Jansens <danakj@orodu.net>
Fri, 25 May 2007 14:18:45 +0000 (14:18 +0000)
committerDana Jansens <danakj@orodu.net>
Fri, 25 May 2007 14:18:45 +0000 (14:18 +0000)
openbox/action.c

index 3a4bab154b5c25c1b4eb20847e58ccd9cd76279d..acb33749d72bd995335e75577e2d9e6004c9a30a 100644 (file)
@@ -1587,9 +1587,8 @@ 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);
-        if (data->sendto.follow)
-            screen_set_desktop(data->sendto.desk,
-                               data->sendto.follow && c == focus_client);
+        if (data->sendto.follow && data->sendto.desk != screen_desktop)
+            screen_set_desktop(data->sendto.desk, c == focus_client);
     }
 }
 
@@ -1646,7 +1645,7 @@ void action_send_to_desktop_dir(union ActionData *data)
     {
         client_set_desktop(c, d, data->sendtodir.follow);
         if (data->sendtodir.follow && d != screen_desktop)
-            screen_set_desktop(d, data->sendtodir.follow && c == focus_client);
+            screen_set_desktop(d, c == focus_client);
     }
 }
 
This page took 0.025507 seconds and 4 git commands to generate.