Skip to content

Commit

Permalink
Revert change from 2010-03-30.
Browse files Browse the repository at this point in the history
'shadow' must be set before 'show' is called, otherwise 'resize' uses
the wrong width.
  • Loading branch information
sf-exg committed Mar 20, 2011
1 parent 19db952 commit dfc28bc
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
3 changes: 1 addition & 2 deletions src/scrollbar-rxvt.C
Expand Up @@ -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);
}
Expand Down
5 changes: 5 additions & 0 deletions src/scrollbar.C
Expand Up @@ -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;

Expand Down

0 comments on commit dfc28bc

Please sign in to comment.