X-Git-Url: https://git.dogcows.com/gitweb?a=blobdiff_plain;f=openbox%2Fmenuframe.c;h=2abd87073190cb39065cb909128a0d1062d57617;hb=a5c2aadf2778d6ab4105abd457cd2ab21a1172ec;hp=4f5a34d8d095c2f5d460406c3194627f4a778296;hpb=9586e3bf1482a30e29f230a1a987386fcdcec2c9;p=chaz%2Fopenbox diff --git a/openbox/menuframe.c b/openbox/menuframe.c index 4f5a34d8..2abd8707 100644 --- a/openbox/menuframe.c +++ b/openbox/menuframe.c @@ -21,6 +21,7 @@ #include "client.h" #include "menu.h" #include "screen.h" +#include "actions.h" #include "grab.h" #include "openbox.h" #include "mainloop.h" @@ -940,7 +941,7 @@ static gboolean menu_frame_show(ObMenuFrame *self) } gboolean menu_frame_show_topmenu(ObMenuFrame *self, gint x, gint y, - gint button) + gboolean mouse) { gint px, py; guint i; @@ -952,7 +953,7 @@ gboolean menu_frame_show_topmenu(ObMenuFrame *self, gint x, gint y, /* find the monitor the menu is on */ for (i = 0; i < screen_num_monitors; ++i) { - Rect a = screen_physical_area_monitor(i); + Rect *a = screen_physical_area_monitor(i); gboolean contains = RECT_CONTAINS(*a, x, y); g_free(a); if (contains) { @@ -962,7 +963,7 @@ gboolean menu_frame_show_topmenu(ObMenuFrame *self, gint x, gint y, } if (self->menu->place_func) - self->menu->place_func(self, &x, &y, button, self->menu->data); + self->menu->place_func(self, &x, &y, mouse, self->menu->data); else menu_frame_place_topmenu(self, &x, &y); @@ -1178,7 +1179,7 @@ void menu_entry_frame_show_submenu(ObMenuEntryFrame *self) menu_frame_show_submenu(f, self->frame, self); } -void menu_entry_frame_execute(ObMenuEntryFrame *self, guint state, Time time) +void menu_entry_frame_execute(ObMenuEntryFrame *self, guint state) { if (self->entry->type == OB_MENU_ENTRY_TYPE_NORMAL && self->entry->data.normal.enabled) @@ -1199,9 +1200,10 @@ void menu_entry_frame_execute(ObMenuEntryFrame *self, guint state, Time time) } if (func) - func(entry, frame, client, state, data, time); + func(entry, frame, client, state, data); else - action_run(acts, client, state, time); + actions_run_acts(acts, OB_USER_ACTION_MENU_SELECTION, + state, -1, -1, 0, OB_FRAME_CONTEXT_NONE, client); } }