--- rxvt-unicode/src/scrollbar.C 2008/02/19 13:01:33 1.61 +++ rxvt-unicode/src/scrollbar.C 2011/08/22 17:09:46 1.68 @@ -6,7 +6,7 @@ * Copyright (c) 1998 Alfredo K. Kojima * - N*XTstep like scrollbars * Copyright (c) 1999-2001 Geoff Wing - * Copyright (c) 2004-2006 Marc Lehmann + * Copyright (c) 2004-2006 Marc Lehmann * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -51,7 +51,7 @@ } else { - state = 0; + state = STATE_OFF; XUnmapWindow (term->dpy, win); change = 1; } @@ -74,7 +74,7 @@ { /* create the scrollbar window */ win = XCreateSimpleWindow (term->dpy, - term->parent[0], + term->parent, window_sb_x, 0, total_width (), term->szHint.height, @@ -121,8 +121,7 @@ int sb_size = (sb_bot - sb_top) * size (); top = beg + (sb_top * size ()) / sb_len; - len = sb_size / sb_len + min_height () + (sb_size % sb_len > 0); - bot = top + len; + bot = top + sb_size / sb_len + min_height () + (sb_size % sb_len > 0); /* no change */ if (top == last_top && bot == last_bot @@ -144,8 +143,9 @@ scrollBar_t::setup (rxvt_term *term) { int i; - short style, width; + short width; const char *scrollalign, *scrollstyle, *thickness; + enum sb_style style; this->term = term; scrollalign = term->rs[Rs_scrollBar_align]; @@ -211,7 +211,7 @@ else if (strncasecmp (scrollalign, "bottom", 6) == 0) align = R_SB_ALIGN_BOTTOM; } - last_bot = last_state = -1; + last_state = STATE_OFF; /* cursor scrollBar: Black-on-White */ leftptr_cursor = XCreateFontCursor (term->dpy, XC_left_ptr); }