]> Dogcows Code - chaz/openbox/blobdiff - openbox/popup.c
remove a bunch of g_new()/g_free() by returning Rect const*'s from screen area functi...
[chaz/openbox] / openbox / popup.c
index c7a01154137158a218f08b345f60650680368f07..8793accc45ac4dbf9f0f1a1e860afbfdeb074e5f 100644 (file)
@@ -158,7 +158,8 @@ void popup_delay_show(ObPopup *self, gulong usec, gchar *text)
     gint emptyx, emptyy; /* empty space between elements */
     gint textx, texty, textw, texth;
     gint iconx, icony, iconw, iconh;
-    Rect *area, mon;
+    Rect const *area;
+    Rect mon;
     gboolean hasicon = self->hasicon;
 
     /* when there is no icon and the text is not parent relative, then
@@ -259,8 +260,6 @@ void popup_delay_show(ObPopup *self, gulong usec, gchar *text)
     x=MAX(MIN(x, area->x+area->width-w),area->x);
     y=MAX(MIN(y, area->y+area->height-h),area->y);
 
-    g_free(area);
-
     if (m == screen_num_monitors) {
         RECT_SET(mon, x, y, w, h);
         m = screen_find_monitor(&mon);
@@ -270,8 +269,6 @@ void popup_delay_show(ObPopup *self, gulong usec, gchar *text)
 
         x=MAX(MIN(x, area->x+area->width-w),area->x);
         y=MAX(MIN(y, area->y+area->height-h),area->y);
-
-        g_free(area);
     }
 
     /* set the windows/appearances up */
This page took 0.020501 seconds and 4 git commands to generate.