]> Dogcows Code - chaz/openbox/blobdiff - openbox/menuframe.c
added the debug action
[chaz/openbox] / openbox / menuframe.c
index 6b3e729b0e0ed56868c1ca172d7bc6825880703c..7bacf02068e48a9a6e45b795136a4509dcf53716 100644 (file)
@@ -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);
     }
 }
 
This page took 0.023111 seconds and 4 git commands to generate.