X-Git-Url: https://git.brokenzipper.com/gitweb?a=blobdiff_plain;f=openbox%2Fpopup.c;h=156ce8605b9751ee6205aff9bc7bcc892586291e;hb=d59f0d67b0a6f3a7eed2753875691e78c08c632c;hp=d1e1a31ff832064421b4b1af75fb68b4280b67fb;hpb=9c32f34b3766de01c51bc5d00c17d68804ab2603;p=chaz%2Fopenbox diff --git a/openbox/popup.c b/openbox/popup.c index d1e1a31f..156ce860 100644 --- a/openbox/popup.c +++ b/openbox/popup.c @@ -52,7 +52,8 @@ ObPopup *popup_new() InputOutput, RrVisual(ob_rr_inst), 0, NULL); XSetWindowBorderWidth(ob_display, self->bg, ob_rr_theme->fbwidth); - XSetWindowBorder(ob_display, self->bg, ob_rr_theme->frame_b_color->pixel); + XSetWindowBorder(ob_display, self->bg, + RrColorPixel(ob_rr_theme->frame_focused_border_color)); XMapWindow(ob_display, self->text); @@ -326,8 +327,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, @@ -486,7 +488,8 @@ void pager_popup_delay_show(ObPagerPopup *self, gulong usec, for (i = self->desks; i < screen_num_desktops; ++i) { XSetWindowAttributes attr; - attr.border_pixel = RrColorPixel(ob_rr_theme->frame_b_color); + attr.border_pixel = + RrColorPixel(ob_rr_theme->frame_focused_border_color); self->wins[i] = XCreateWindow(ob_display, self->popup->bg, 0, 0, 1, 1, ob_rr_theme->fbwidth, RrDepth(ob_rr_inst), InputOutput, @@ -503,6 +506,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); }