Fix some compiler warnings for ShowMenu
[dana/openbox.git] / openbox / actions / showmenu.c
index 08e625e..0fdd8be 100644 (file)
@@ -3,6 +3,7 @@
 #include "openbox/place.h"
 #include "openbox/geom.h"
 #include "openbox/screen.h"
+#include "openbox/config.h"
 #include <glib.h>
 
 typedef struct {
@@ -82,7 +83,7 @@ static void free_func(gpointer options)
 static gboolean run_func(ObActionsData *data, gpointer options)
 {
     Options *o = options;
-    GravityPoint position = { 0, };
+    GravityPoint position = { { 0, }, };
     gint monitor = -1;
 
     if (o->use_position) {
@@ -115,7 +116,8 @@ static gboolean run_func(ObActionsData *data, gpointer options)
 
     /* you cannot call ShowMenu from inside a menu */
     if (data->uact != OB_USER_ACTION_MENU_SELECTION && o->name)
-        menu_show(o->name, position, monitor, data->button != 0, data->client);
+        menu_show(o->name, &position, monitor,
+                  data->button != 0, o->use_position, data->client);
 
     return FALSE;
 }