]> Dogcows Code - chaz/openbox/blobdiff - openbox/menuframe.c
that got commited by accident somewhere
[chaz/openbox] / openbox / menuframe.c
index fa9e8e9d9ab1ab59e1c93a9670f2615c663232e2..fdb24afbad7b388ab6b89a279f20c6ef4092b12b 100644 (file)
@@ -343,6 +343,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)
@@ -731,7 +733,7 @@ void menu_frame_render(ObMenuFrame *self)
             if (e->entry->data.separator.label != NULL) {
                 e->a_text_title->texture[0].data.text.string =
                     e->entry->data.separator.label;
-                tw = RrMinWidth(e->a_text_title);
+                tw = RrMinWidth(e->a_text_title) + 2*ob_rr_theme->paddingx;
                 tw = MIN(tw, MAX_MENU_WIDTH);
                 th = ob_rr_theme->menu_title_height +
                     (ob_rr_theme->mbwidth - PADDING) *2;
@@ -888,6 +890,8 @@ static void menu_frame_update(ObMenuFrame *self)
         }
     }
 
+    g_free(a);
+
     menu_frame_render(self);
 }
 
@@ -949,7 +953,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;
         }
@@ -1058,8 +1064,6 @@ void menu_frame_hide_all()
     }
     if ((it = g_list_last(menu_frame_visible)))
         menu_frame_hide(it->data);
-
-    menu_clear_pipe_caches();
 }
 
 void menu_frame_hide_all_client(ObClient *client)
@@ -1070,8 +1074,6 @@ void menu_frame_hide_all_client(ObClient *client)
         if (f->client == client)
             menu_frame_hide(f);
     }
-
-    menu_clear_pipe_caches();
 }
 
 
This page took 0.021737 seconds and 4 git commands to generate.