bad idea.. more thought is needed..
authorDana Jansens <danakj@orodu.net>
Sun, 25 Mar 2007 15:16:00 +0000 (15:16 +0000)
committerDana Jansens <danakj@orodu.net>
Sun, 25 Mar 2007 15:16:00 +0000 (15:16 +0000)
openbox/action.c
openbox/action.h

index 4187c26..4fd86d3 100644 (file)
@@ -1013,7 +1013,7 @@ ObAction *action_parse(ObParseInst *i, xmlDocPtr doc, xmlNodePtr node,
 }
 
 void action_run_list(GSList *acts, ObClient *c, ObFrameContext context,
-                     guint state, gint button, gint x, gint y, Time time,
+                     guint state, guint button, gint x, gint y, Time time,
                      gboolean cancel, gboolean done)
 {
     GSList *it;
@@ -1621,16 +1621,8 @@ void action_exit(union ActionData *data)
 void action_showmenu(union ActionData *data)
 {
     if (data->showmenu.name) {
-        gint x, y;
-        ObClient *c = data->showmenu.any.c;
-        if (data->any.button == -1 && c) {
-            x = c->frame->area.x + c->frame->size.left;
-            y = c->frame->area.y + c->frame->size.top;
-        } else {
-            x = data->any.x;
-            y = data->any.y;
-        }
-        menu_show(data->showmenu.name, x, y, c);
+        menu_show(data->showmenu.name, data->any.x, data->any.y,
+                  data->showmenu.any.c);
     }
 }
 
index 26ae55d..b1bc081 100644 (file)
@@ -212,7 +212,7 @@ ObAction* action_copy(const ObAction *a);
          affects interactive actions, but should generally always be FALSE.
 */
 void action_run_list(GSList *acts, struct _ObClient *c, ObFrameContext context,
-                     guint state, gint button, gint x, gint y, Time time,
+                     guint state, guint button, gint x, gint y, Time time,
                      gboolean cancel, gboolean done);
 
 #define action_run_mouse(a, c, n, s, b, x, y, t) \
@@ -222,7 +222,7 @@ void action_run_list(GSList *acts, struct _ObClient *c, ObFrameContext context,
     action_run_list(a, c, OB_FRAME_CONTEXT_NONE, s, 0, -1, -1, t, n, d)
 
 #define action_run_key(a, c, s, x, y, t) \
-    action_run_list(a, c, OB_FRAME_CONTEXT_NONE, s, -1, x, y, t, FALSE, FALSE)
+    action_run_list(a, c, OB_FRAME_CONTEXT_NONE, s, 0, x, y, t, FALSE, FALSE)
 
 #define action_run(a, c, s, t) \
     action_run_list(a, c, OB_FRAME_CONTEXT_NONE, s, 0, -1, -1, t, FALSE, FALSE)