summaryrefslogtreecommitdiff
path: root/openbox/menu.c
diff options
context:
space:
mode:
authorDana Jansens <danakj@orodu.net>2007-04-26 05:08:33 +0000
committerDana Jansens <danakj@orodu.net>2007-04-26 05:08:33 +0000
commit26879183e96f5a0d981e6ae76fda82a0d4564b20 (patch)
treee956f1589a75b4e37b30670b3c1b7803faeac642 /openbox/menu.c
parent853a5b6b042cad94aa9c81290ed3bed34a6ae90d (diff)
place the client menu at the top left of the window when opening it with a key binding.
change how the first menus are placed. place them like other people place menus. maybe this is good, maybe it is bad, we will see..
Diffstat (limited to 'openbox/menu.c')
-rw-r--r--openbox/menu.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/openbox/menu.c b/openbox/menu.c
index 7197868b..9aed40aa 100644
--- a/openbox/menu.c
+++ b/openbox/menu.c
@@ -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;