]> Dogcows Code - chaz/openbox/blobdiff - plugins/mouse/mouseparse.c
dockapps are ObWindows now.
[chaz/openbox] / plugins / mouse / mouseparse.c
index d2039dd86970b1e1bed652120e6746f7e65e7d1d..2c94fb19cd50c6a83c354a8bc6d62afb1f757ce6 100644 (file)
@@ -1,5 +1,6 @@
 #include "kernel/action.h"
 #include "kernel/parse.h"
+#include "kernel/prop.h"
 #include "mouse.h"
 
 void mouseparse(ParseToken *token)
@@ -68,12 +69,24 @@ void mouseparse(ParseToken *token)
             action = action_from_string(token->data.identifier);
 
             /* check for valid actions for motion events */
-            if ((event == MouseAction_Motion) ^
-                (action &&
-                 (action->func == action_move ||
-                  action->func == action_resize))) {
-                action_free(action);
-                action = NULL;
+            if (event == MouseAction_Motion) {
+                if (action && (action->func != action_moveresize ||
+                               action->data.moveresize.corner ==
+                               prop_atoms.net_wm_moveresize_move_keyboard ||
+                               action->data.moveresize.corner ==
+                               prop_atoms.net_wm_moveresize_size_keyboard)) {
+                    action_free(action);
+                    action = NULL;
+                }
+            } else {
+                if (action && action->func == action_moveresize &&
+                    action->data.moveresize.corner !=
+                    prop_atoms.net_wm_moveresize_move_keyboard &&
+                    action->data.moveresize.corner !=
+                    prop_atoms.net_wm_moveresize_size_keyboard) {
+                    action_free(action);
+                    action = NULL;
+                }
             }
 
             if (action != NULL) {
@@ -99,6 +112,8 @@ void mouseparse(ParseToken *token)
         /* these use the argument */
         if (action->func == action_execute || action->func == action_restart)
             action->data.execute.path = g_strdup(arg_str);
+        else if (action->func == action_showmenu)
+            action->data.showmenu.name = g_strdup(arg_str);
         if ((action->func == action_desktop ||
              action->func == action_send_to_desktop) &&
             arg_int)
This page took 0.020991 seconds and 4 git commands to generate.