From: Dana Jansens Date: Thu, 10 May 2007 16:34:11 +0000 (+0000) Subject: merge r6301 from trunk X-Git-Tag: openbox-3_3_991-RELEASE~107 X-Git-Url: http://git.openbox.org/?a=commitdiff_plain;h=20ac6039d60c33159a557ff9ac81df8e3c043837;p=dana%2Fopenbox.git merge r6301 from trunk --- diff --git a/openbox/popup.c b/openbox/popup.c index d1e1a31f..e3d52e49 100644 --- a/openbox/popup.c +++ b/openbox/popup.c @@ -326,8 +326,9 @@ void icon_popup_delay_show(ObIconPopup *self, gulong usec, void icon_popup_icon_size_multiplier(ObIconPopup *self, guint wm, guint hm) { - if (wm != 0) self->popup->iconwm = wm; - if (hm != 0) self->popup->iconhm = hm; + /* cap them at 1 */ + self->popup->iconwm = MAX(1, wm); + self->popup->iconhm = MAX(1, hm); } static void pager_popup_draw_icon(gint px, gint py, gint w, gint h, @@ -503,6 +504,7 @@ void pager_popup_delay_show(ObPagerPopup *self, gulong usec, void pager_popup_icon_size_multiplier(ObPagerPopup *self, guint wm, guint hm) { - if (wm != 0) self->popup->iconwm = wm; - if (hm != 0) self->popup->iconhm = hm; + /* cap them at 1 */ + self->popup->iconwm = MAX(1, wm); + self->popup->iconhm = MAX(1, hm); }