]> Dogcows Code - chaz/openbox/blobdiff - openbox/action.c
fix problems with conflicing interactive desktop switching and send-to-ing
[chaz/openbox] / openbox / action.c
index 332e100d45c4a15bdd4ed0363d1e6310ece2642a..007073f1267c3573a5353df3024a18737079aabc 100644 (file)
@@ -49,13 +49,17 @@ inline void client_action_end(union ActionData *data)
             } else {
                 ObClient *c;
 
+                /* usually this is sorta redundant, but with a press action
+                   the enter event will come as a GrabNotify which is
+                   ignored, so this will handle that case */
                 if ((c = client_under_pointer()))
                     event_enter_client(c);
             }
         }
 }
 
-typedef struct ActionString {
+typedef struct
+{
     const gchar *name;
     void (*func)(union ActionData *);
     void (*setup)(ObAction **, ObUserAction uact);
@@ -1191,7 +1195,11 @@ void action_desktop_dir(union ActionData *data)
                              data->desktopdir.inter.any.interactive,
                              data->desktopdir.inter.final,
                              data->desktopdir.inter.cancel);
-    screen_set_desktop(d);
+    if (!data->sendtodir.inter.any.interactive ||
+        !data->sendtodir.inter.final)
+    {
+        screen_set_desktop(d);
+    }
 }
 
 void action_send_to_desktop_dir(union ActionData *data)
@@ -1206,9 +1214,13 @@ void action_send_to_desktop_dir(union ActionData *data)
                              data->sendtodir.inter.any.interactive,
                              data->sendtodir.inter.final,
                              data->sendtodir.inter.cancel);
-    client_set_desktop(c, d, data->sendtodir.follow);
-    if (data->sendtodir.follow)
-        screen_set_desktop(d);
+    if (!data->sendtodir.inter.any.interactive ||
+        !data->sendtodir.inter.final)
+    {
+        client_set_desktop(c, d, data->sendtodir.follow);
+        if (data->sendtodir.follow)
+            screen_set_desktop(d);
+    }
 }
 
 void action_desktop_last(union ActionData *data)
This page took 0.020855 seconds and 4 git commands to generate.