]> Dogcows Code - chaz/openbox/blobdiff - openbox/menu.c
place the client menu at the top left of the window when opening it with a key binding.
[chaz/openbox] / openbox / menu.c
index 7197868b79c76230fd335813b57bc20f5b43854a..9aed40aa8d6311bffc4adb20da9635a94ac83849 100644 (file)
@@ -360,7 +360,7 @@ void menu_free(ObMenu *menu)
     g_hash_table_remove(menu_hash, menu->name);
 }
 
-void menu_show(gchar *name, gint x, gint y, ObClient *client)
+void menu_show(gchar *name, gint x, gint y, gint button, ObClient *client)
 {
     ObMenu *self;
     ObMenuFrame *frame;
@@ -379,7 +379,7 @@ void menu_show(gchar *name, gint x, gint y, ObClient *client)
     menu_frame_hide_all();
 
     frame = menu_frame_new(self, client);
-    if (!menu_frame_show_topmenu(frame, x, y))
+    if (!menu_frame_show_topmenu(frame, x, y, button))
         menu_frame_free(frame);
     else if (frame->entries) {
         ObMenuEntryFrame *e = frame->entries->data;
@@ -515,6 +515,11 @@ void menu_set_destroy_func(ObMenu *self, ObMenuDestroyFunc func)
     self->destroy_func = func;
 }
 
+void menu_set_place_func(ObMenu *self, ObMenuPlaceFunc func)
+{
+    self->place_func = func;
+}
+
 ObMenuEntry* menu_find_entry_id(ObMenu *self, gint id)
 {
     ObMenuEntry *ret = NULL;
This page took 0.020901 seconds and 4 git commands to generate.