]> Dogcows Code - chaz/openbox/commitdiff
always set the multipliers just dont allow 0
authorDana Jansens <danakj@orodu.net>
Thu, 10 May 2007 16:34:03 +0000 (16:34 +0000)
committerDana Jansens <danakj@orodu.net>
Thu, 10 May 2007 16:34:03 +0000 (16:34 +0000)
openbox/popup.c

index d1e1a31ff832064421b4b1af75fb68b4280b67fb..e3d52e496a5be3b12c074ee9c17068d04aeed1f3 100644 (file)
@@ -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);
 }
This page took 0.026566 seconds and 4 git commands to generate.