--- rxvt-unicode/src/scrollbar.C 2008/02/17 12:21:45 1.54 +++ rxvt-unicode/src/scrollbar.C 2008/02/18 09:58:27 1.56 @@ -63,6 +63,10 @@ rxvt_term::resize_scrollbar () { int delayed_init = 0; + int window_sb_x = 0; + + if (option (Opt_scrollBar_right)) + window_sb_x = szHint.width - scrollBar.total_width (); #define R_SCROLLBEG_XTERM 0 #define R_SCROLLEND_XTERM szHint.height @@ -127,6 +131,10 @@ delayed_init = 1; } + else + XMoveResizeWindow (dpy, scrollBar.win, + window_sb_x, 0, + scrollBar.total_width (), szHint.height); scrollbar_show (1); @@ -150,11 +158,10 @@ int top = view_start - top_row; int bot = top + (nrow - 1); int len = max (nrow - 1 - top_row, 1); - int adj = (((bot - top) * scrollBar.size ()) % len) > 0 ? 1 : 0; + int size = (bot - top) * scrollBar.size (); scrollBar.top = (scrollBar.beg + (top * scrollBar.size ()) / len); - scrollBar.len = ((bot - top) * scrollBar.size ()) / len + - scrollBar.min_height () + adj; + scrollBar.len = size / len + scrollBar.min_height () + (size % len > 0); scrollBar.bot = (scrollBar.top + scrollBar.len); /* no change */ if (scrollBar.top == scrollBar.last_top