From 92a1b93aecb4df5300a4251a35bbe400b8072aa4 Mon Sep 17 00:00:00 2001 From: ayin Date: Tue, 1 Jan 2008 21:14:39 +0000 Subject: [PATCH] Revert q09mE8WxONp1QkLs and move scrollbar_len from rxvt_term to scrollBar_t. --- Changes | 2 -- src/scrollbar.C | 7 +++---- src/scrollbar.h | 1 + 3 files changed, 4 insertions(+), 6 deletions(-) diff --git a/Changes b/Changes index 7c8c2e75..bb07eb17 100644 --- 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. diff --git a/src/scrollbar.C b/src/scrollbar.C index 77f9f18f..e299cc3c 100644 --- a/src/scrollbar.C +++ b/src/scrollbar.C @@ -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; diff --git a/src/scrollbar.h b/src/scrollbar.h index aee19713..a53bf53b 100644 --- a/src/scrollbar.h +++ b/src/scrollbar.h @@ -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); -- 2.34.1