diff options
| author | Dana Jansens <danakj@orodu.net> | 2010-02-12 14:36:53 -0500 |
|---|---|---|
| committer | Dana Jansens <danakj@orodu.net> | 2010-02-12 14:37:33 -0500 |
| commit | aeac3b735bf4caf7c014c58c1271b2cbe5aedd80 (patch) | |
| tree | f727f835b505a3676c081698c5a77458b0e9ec1c /openbox/popup.c | |
| parent | e61fd8874a8352fb5fa1c4b2ab84d29679fa7b0c (diff) | |
remove a bunch of g_new()/g_free() by returning Rect const*'s from screen area functions when possible
Diffstat (limited to 'openbox/popup.c')
| -rw-r--r-- | openbox/popup.c | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/openbox/popup.c b/openbox/popup.c index c7a01154..8793accc 100644 --- a/openbox/popup.c +++ b/openbox/popup.c @@ -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 */ |
