X-Git-Url: https://git.dogcows.com/gitweb?a=blobdiff_plain;f=openbox%2Ffocus_cycle_popup.c;h=3a2981dd4bd41abe9c8f8e4ff13423f7ba2462af;hb=aeac3b735bf4caf7c014c58c1271b2cbe5aedd80;hp=08016fe37195c8db9e96592592e2b29b910db036;hpb=31f0c8c1ad8c9acf369ab8336765f4bf673b8e21;p=chaz%2Fopenbox diff --git a/openbox/focus_cycle_popup.c b/openbox/focus_cycle_popup.c index 08016fe3..3a2981dd 100644 --- a/openbox/focus_cycle_popup.c +++ b/openbox/focus_cycle_popup.c @@ -246,7 +246,7 @@ static void popup_target_free(ObFocusCyclePopupTarget *t) g_free(t->text); XDestroyWindow(obt_display, t->iconwin); XDestroyWindow(obt_display, t->textwin); - g_free(t); + g_slice_free(ObFocusCyclePopupTarget, t); } static gboolean popup_setup(ObFocusCyclePopup *p, gboolean create_targets, @@ -313,7 +313,7 @@ static gboolean popup_setup(ObFocusCyclePopup *p, gboolean create_targets, g_free(text); } else { ObFocusCyclePopupTarget *t = - g_new(ObFocusCyclePopupTarget, 1); + g_slice_new(ObFocusCyclePopupTarget); t->client = ft; t->text = text; @@ -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);