]> Dogcows Code - chaz/openbox/blobdiff - openbox/focus_cycle_popup.c
remove a bunch of g_new()/g_free() by returning Rect const*'s from screen area functi...
[chaz/openbox] / openbox / focus_cycle_popup.c
index 00f5f7a14d215ce7202140284c1ab5bc30c47949..3a2981dd4bd41abe9c8f8e4ff13423f7ba2462af 100644 (file)
@@ -392,7 +392,7 @@ static void popup_render(ObFocusCyclePopup *p, const ObClient *c)
     gint ml, mt, mr, mb;
     gint l, t, r, b;
     gint x, y, w, h;
-    Rect *screen_area = NULL;
+    Rect const *screen_area = NULL;
     gint i;
     GList *it;
     const ObFocusCyclePopupTarget *newtarget;
@@ -697,8 +697,6 @@ static void popup_render(ObFocusCyclePopup *p, const ObClient *c)
 
     p->last_target = newtarget;
 
-    g_free(screen_area);
-
     XFlush(obt_display);
 }
 
@@ -761,7 +759,7 @@ void focus_cycle_popup_single_show(struct _ObClient *c,
 
     /* do this stuff only when the dialog is first showing */
     if (!popup.mapped) {
-        Rect *a;
+        Rect const *a;
 
         popup_setup(&popup, FALSE, FALSE);
         g_assert(popup.targets == NULL);
@@ -774,7 +772,6 @@ void focus_cycle_popup_single_show(struct _ObClient *c,
         icon_popup_min_width(single_popup, POPUP_WIDTH);
         icon_popup_max_width(single_popup, MAX(a->width/3, POPUP_WIDTH));
         icon_popup_text_width(single_popup, popup.maxtextw);
-        g_free(a);
     }
 
     text = popup_get_name(c);
This page took 0.020417 seconds and 4 git commands to generate.