From dfc28bc83eb5599723d6d791c4a4e18c012802fd Mon Sep 17 00:00:00 2001 From: sf-exg Date: Sun, 20 Mar 2011 19:55:16 +0000 Subject: [PATCH] Revert change from 2010-03-30. 'shadow' must be set before 'show' is called, otherwise 'resize' uses the wrong width. --- src/scrollbar-rxvt.C | 3 +-- src/scrollbar.C | 5 +++++ 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/src/scrollbar-rxvt.C b/src/scrollbar-rxvt.C index 955bd8d..5d61fb2 100644 --- a/src/scrollbar-rxvt.C +++ b/src/scrollbar-rxvt.C @@ -164,9 +164,8 @@ scrollBar_t::show_rxvt (int update) botShadowGC = XCreateGC (term->dpy, term->vt, GCForeground, &gcvalue); gcvalue.foreground = term->pix_colors[ (term->depth <= 2 ? Color_fg : Color_scroll)]; scrollbarGC = XCreateGC (term->dpy, term->vt, GCForeground, &gcvalue); - if (!term->option (Opt_scrollBar_floating)) + if (shadow) { - shadow = SHADOW_WIDTH; XSetWindowBackground (term->dpy, win, term->pix_colors_focused[Color_trough]); XClearWindow (term->dpy, win); } diff --git a/src/scrollbar.C b/src/scrollbar.C index d272476..5dcb0f0 100644 --- a/src/scrollbar.C +++ b/src/scrollbar.C @@ -194,6 +194,11 @@ scrollBar_t::setup (rxvt_term *term) if (thickness && (i = atoi (thickness)) >= SB_WIDTH_MINIMUM) width = min (i, SB_WIDTH_MAXIMUM); +# ifdef RXVT_SCROLLBAR + if (! term->option (Opt_scrollBar_floating) && style == R_SB_RXVT) + shadow = SHADOW_WIDTH; +# endif + this->style = style; this->width = width;