Revert q09mE8WxONp1QkLs and move scrollbar_len from rxvt_term to scrollBar_t.
authorayin <ayin>
Tue, 1 Jan 2008 21:14:39 +0000 (21:14 +0000)
committerayin <ayin>
Tue, 1 Jan 2008 21:14:39 +0000 (21:14 +0000)
Changes
src/scrollbar.C
src/scrollbar.h

diff --git a/Changes b/Changes
index 7c8c2e75993886b75e6d70aa68bd5db70c7a2bbd..bb07eb1752da904bafd4fd3140a53307189661cf 100644 (file)
--- a/Changes
+++ b/Changes
@@ -17,8 +17,6 @@ WISH: load system-wide config file even if we don't have one
 WISH: look into XAddConnectionWatch, does anybody need that?
 DUMB: support tex fonts
 
-TODO: with -ip, the scorllbar doesn't refresh after resizing.
-
 8.9  Mon Dec 24 07:51:40 CET 2007
        - fix the issue where urxvtd would not immediately close a window
           when the command exited but only on the next X event.
index 77f9f18f3c6a47725cbc50e4215fa729cbfe4918..e299cc3c7bcd35f7a63f74a7fa6d2dddb21e57d9 100644 (file)
@@ -147,7 +147,6 @@ rxvt_term::scrollbar_show (int update)
   int             ret = 0;
 #ifdef HAVE_SCROLLBARS
   int             top, bot, len, adj;
-  int             scrollbar_len = 0;
 
   if (!scrollBar.state)
     return 0;
@@ -160,9 +159,9 @@ rxvt_term::scrollbar_show (int update)
       adj = (((bot - top) * scrollbar_size ()) % len) > 0 ? 1 : 0;
 
       scrollBar.top = (scrollBar.beg + (top * scrollbar_size ()) / len);
-      scrollbar_len = ((bot - top) * scrollbar_size ()) / len +
+      scrollBar.len = ((bot - top) * scrollbar_size ()) / len +
                       scrollbar_minheight () + adj;
-      scrollBar.bot = (scrollBar.top + scrollbar_len);
+      scrollBar.bot = (scrollBar.top + ScrollBar.len);
       /* no change */
       if (scrollBar.top == scrollBar.last_top
           && scrollBar.bot == scrollBar.last_bot
@@ -170,7 +169,7 @@ rxvt_term::scrollbar_show (int update)
         return 0;
     }
 
-  ret = (this->*scrollBar.update) (update, scrollBar.last_top, scrollBar.last_bot, scrollbar_len);
+  ret = (this->*scrollBar.update) (update, scrollBar.last_top, scrollBar.last_bot, scrollBar.len);
 
   scrollBar.last_top = scrollBar.top;
   scrollBar.last_bot = scrollBar.bot;
index aee19713a0cd51cff335ad621e93e6f1e29b968a..a53bf53b0cdb2361474f3c0b24213dc44c72ec0e 100644 (file)
@@ -18,6 +18,7 @@ typedef struct {
   int             last_bot;     /* scrollbar last bottom position           */
   int             last_top;     /* scrollbar last top position              */
   int             last_state;   /* scrollbar last state                     */
+  int             len;
   unsigned char   align;
   Window          win;
   int             (rxvt_term::*update)(int, int, int, int);