Move scrollbar_align from rxvt_xterm to scrollBar_t.
authorayin <ayin>
Sun, 30 Dec 2007 23:45:42 +0000 (23:45 +0000)
committerayin <ayin>
Sun, 30 Dec 2007 23:45:42 +0000 (23:45 +0000)
src/command.C
src/rxvt.h
src/scrollbar.C
src/scrollbar.h

index b0481be843f82963c5cb044c39d3f0abbf5839dc..23ca15cd0bf90d859852fcc7f87c05cbfff39370 100644 (file)
@@ -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 */
 
index c8673691258f36e642be8680560ceeb22cc73044..67471377b6054be8ec62d269b307843a217de330 100644 (file)
@@ -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;
 /* ---------- */
index f0e35a6ad2d90d87424bf9819cdbe37ee04b316e..075d51b1c99910843e3b89d3bdbc92e48640ef3a 100644 (file)
@@ -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
 }
index 14454a2b5acdf7cd5269adcc16b84e964c7b8501..87e3f92ee541ecdbeecc5618ae279d42cc6466b7 100644 (file)
@@ -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);