summaryrefslogtreecommitdiff
path: root/openbox/focus_cycle_popup.c
diff options
context:
space:
mode:
authorDana Jansens <danakj@orodu.net>2010-02-12 14:36:53 -0500
committerDana Jansens <danakj@orodu.net>2010-02-12 14:37:33 -0500
commitaeac3b735bf4caf7c014c58c1271b2cbe5aedd80 (patch)
treef727f835b505a3676c081698c5a77458b0e9ec1c /openbox/focus_cycle_popup.c
parente61fd8874a8352fb5fa1c4b2ab84d29679fa7b0c (diff)
remove a bunch of g_new()/g_free() by returning Rect const*'s from screen area functions when possible
Diffstat (limited to 'openbox/focus_cycle_popup.c')
-rw-r--r--openbox/focus_cycle_popup.c7
1 files changed, 2 insertions, 5 deletions
diff --git a/openbox/focus_cycle_popup.c b/openbox/focus_cycle_popup.c
index 00f5f7a1..3a2981dd 100644
--- a/openbox/focus_cycle_popup.c
+++ b/openbox/focus_cycle_popup.c
@@ -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);