--- rxvt-unicode/src/scrollbar-plain.C 2004/08/23 19:57:33 1.13 +++ rxvt-unicode/src/scrollbar-plain.C 2007/12/29 14:25:42 1.22 @@ -4,7 +4,7 @@ * * Copyright (c) 1997,1998 mj olesen * Copyright (c) 1999-2001 Geoff Wing - * Copyright (c) 2004 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 @@ -40,30 +40,29 @@ scrollBar.init |= R_SB_PLAIN; gcvalue.foreground = pix_colors_focused[Color_scroll]; - pscrollbarGC = XCreateGC (display->display, scrollBar.win, - GCForeground, &gcvalue); + pscrollbarGC = XCreateGC (dpy, scrollBar.win, GCForeground, &gcvalue); } - xsb = (options & Opt_scrollBar_right) ? 1 : 0; + xsb = option (Opt_scrollBar_right) ? 1 : 0; if (update) { if (last_top < scrollBar.top) - XClearArea (display->display, scrollBar.win, - sb_shadow + xsb, last_top, - sbwidth + 1, (scrollBar.top - last_top), False); + XClearArea (dpy, scrollBar.win, + scrollBar.sb_shadow, last_top, + sbwidth + 1, scrollBar.top - last_top, False); if (scrollBar.bot < last_bot) - XClearArea (display->display, scrollBar.win, - sb_shadow + xsb, scrollBar.bot, - sbwidth + 1, (last_bot - scrollBar.bot), False); + XClearArea (dpy, scrollBar.win, + scrollBar.sb_shadow, scrollBar.bot, + sbwidth + 1, last_bot - scrollBar.bot, False); } else - XClearWindow (display->display, scrollBar.win); + XClearWindow (dpy, scrollBar.win); /* scrollbar slider */ - XFillRectangle (display->display, scrollBar.win, pscrollbarGC, - xsb + 1, scrollBar.top, sbwidth, scrollbar_len); + XFillRectangle (dpy, scrollBar.win, pscrollbarGC, + 1 - xsb, scrollBar.top, sbwidth, scrollbar_len); return 1; }