summaryrefslogtreecommitdiff
path: root/openbox/menuframe.c
diff options
context:
space:
mode:
authorDana Jansens <danakj@orodu.net>2003-08-28 07:34:03 +0000
committerDana Jansens <danakj@orodu.net>2003-08-28 07:34:03 +0000
commitf7eb47dba4b091b67a28404ce461b15dffcb4298 (patch)
treeb96cc34aa1565722889472d3b5e77bc7ae02af7a /openbox/menuframe.c
parentffba11aeb059bef0b4876eb6aad2a8a24e2db6f1 (diff)
make client-list-menu work too
more menu cleanups
Diffstat (limited to 'openbox/menuframe.c')
-rw-r--r--openbox/menuframe.c28
1 files changed, 17 insertions, 11 deletions
diff --git a/openbox/menuframe.c b/openbox/menuframe.c
index 832f49af..ea7f254c 100644
--- a/openbox/menuframe.c
+++ b/openbox/menuframe.c
@@ -344,8 +344,10 @@ static void menu_frame_render(ObMenuFrame *self)
}
if (!w) w = 10;
- if (!allitems_h) allitems_h = 3;
- if (!h) h = 3;
+ if (!allitems_h) {
+ allitems_h = 3;
+ h += 3;
+ }
XResizeWindow(ob_display, self->window, w, h);
XResizeWindow(ob_display, self->items, w, allitems_h);
@@ -546,20 +548,24 @@ void menu_entry_frame_show_submenu(ObMenuEntryFrame *self)
menu_frame_show(f, self->frame);
}
-void menu_entry_frame_execute(ObMenuEntryFrame *self)
+void menu_entry_frame_execute(ObMenuEntryFrame *self, gboolean hide)
{
if (self->entry->type == OB_MENU_ENTRY_TYPE_NORMAL) {
- GSList *it;
-
/* release grabs before executing the shit */
menu_frame_hide_all();
- for (it = self->entry->data.normal.actions; it;
- it = g_slist_next(it))
- {
- ObAction *act = it->data;
- act->data.any.c = self->frame->client;
- act->func(&act->data);
+ if (self->frame->menu->execute_func)
+ self->frame->menu->execute_func(self, self->frame->menu->data);
+ else {
+ GSList *it;
+
+ for (it = self->entry->data.normal.actions; it;
+ it = g_slist_next(it))
+ {
+ ObAction *act = it->data;
+ act->data.any.c = self->frame->client;
+ act->func(&act->data);
+ }
}
}
}