From 05d07ee8ac06474f88a3ded7c07d7d1591cd2d68 Mon Sep 17 00:00:00 2001 From: ayin Date: Sun, 30 Dec 2007 23:45:42 +0000 Subject: [PATCH] Move scrollbar_align from rxvt_xterm to scrollBar_t. --- src/command.C | 4 ++-- src/rxvt.h | 1 - src/scrollbar.C | 6 +++--- src/scrollbar.h | 1 + 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/command.C b/src/command.C index b0481be8..23ca15cd 100644 --- a/src/command.C +++ b/src/command.C @@ -2009,7 +2009,7 @@ rxvt_term::button_press (XButtonEvent &ev) switch (ev.button) { case Button2: - switch (scrollbar_align) + switch (scrollBar.align) { case R_SB_ALIGN_TOP: csrO = 0; @@ -2031,7 +2031,7 @@ rxvt_term::button_press (XButtonEvent &ev) break; case Button1: - if (scrollbar_align == R_SB_ALIGN_CENTRE) + if (scrollBar.align == R_SB_ALIGN_CENTRE) csrO = ev.y - scrollBar.top; /* FALLTHROUGH */ diff --git a/src/rxvt.h b/src/rxvt.h index c8673691..67471377 100644 --- a/src/rxvt.h +++ b/src/rxvt.h @@ -978,7 +978,6 @@ struct rxvt_term : zero_initialized, rxvt_vars, rxvt_screen { #ifdef META8_OPTION meta_char, /* Alt-key prefix */ #endif - scrollbar_align, selection_wait, selection_type; /* ---------- */ diff --git a/src/scrollbar.C b/src/scrollbar.C index f0e35a6a..075d51b1 100644 --- a/src/scrollbar.C +++ b/src/scrollbar.C @@ -238,13 +238,13 @@ rxvt_term::setup_scrollbar (const char *scrollalign, const char *scrollstyle, co scrollBar.style = style; scrollBar.width = width; - /* scrollbar_align = R_SB_ALIGN_CENTRE; */ + /* scrollBar.align = R_SB_ALIGN_CENTRE; */ if (scrollalign) { if (strncasecmp (scrollalign, "top", 3) == 0) - scrollbar_align = R_SB_ALIGN_TOP; + scrollBar.align = R_SB_ALIGN_TOP; else if (strncasecmp (scrollalign, "bottom", 6) == 0) - scrollbar_align = R_SB_ALIGN_BOTTOM; + scrollBar.align = R_SB_ALIGN_BOTTOM; } #endif } diff --git a/src/scrollbar.h b/src/scrollbar.h index 14454a2b..87e3f92e 100644 --- a/src/scrollbar.h +++ b/src/scrollbar.h @@ -15,6 +15,7 @@ typedef struct { unsigned int style; /* style: rxvt, xterm, next */ unsigned int width; /* scrollbar width */ int shadow; /* scrollbar shadow width */ + unsigned char align; Window win; int (rxvt_term::*update)(int, int, int, int); -- 2.34.1