X-Git-Url: https://git.dogcows.com/gitweb?a=blobdiff_plain;f=openbox%2Fmenuframe.c;h=7bacf02068e48a9a6e45b795136a4509dcf53716;hb=9dacac5e5e6b9ed86e76680b048bc227d8866ac6;hp=6b3e729b0e0ed56868c1ca172d7bc6825880703c;hpb=d57ea6ece7e91eb7876b7e31ab343f2b9b848986;p=chaz%2Fopenbox diff --git a/openbox/menuframe.c b/openbox/menuframe.c index 6b3e729b..7bacf020 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" @@ -343,6 +344,8 @@ void menu_frame_move_on_screen(ObMenuFrame *self, gint x, gint y, *dx = MAX(*dx, a->x - x); *dy = MAX(*dy, a->y - y); } + + g_free(a); } static void menu_entry_frame_render(ObMenuEntryFrame *self) @@ -888,6 +891,8 @@ static void menu_frame_update(ObMenuFrame *self) } } + g_free(a); + menu_frame_render(self); } @@ -949,7 +954,9 @@ 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); - if (RECT_CONTAINS(*a, x, y)) { + gboolean contains = RECT_CONTAINS(*a, x, y); + g_free(a); + if (contains) { self->monitor = i; break; } @@ -1195,7 +1202,9 @@ void menu_entry_frame_execute(ObMenuEntryFrame *self, guint state, Time time) if (func) func(entry, frame, client, state, data, time); else - action_run(acts, client, state, time); + actions_run_acts(acts, OB_USER_ACTION_MENU_SELECTION, + time, state, -1, -1, OB_FRAME_CONTEXT_NONE, + client); } }