Move leftptr_cursor from rxvt_term to scrollBar_t.
authorayin <ayin>
Fri, 4 Jan 2008 17:57:28 +0000 (17:57 +0000)
committerayin <ayin>
Fri, 4 Jan 2008 17:57:28 +0000 (17:57 +0000)
src/init.C
src/rxvt.h
src/rxvtperl.xs
src/scrollbar.C
src/scrollbar.h

index b71f23f..b470ce1 100644 (file)
@@ -1077,11 +1077,6 @@ rxvt_term::create_windows (int argc, const char *const *argv)
   /* vt cursor: Black-on-White is standard, but this is more popular */
   TermWin_cursor = XCreateFontCursor (dpy, XC_xterm);
 
-#ifdef HAVE_SCROLLBARS
-  /* cursor scrollBar: Black-on-White */
-  leftptr_cursor = XCreateFontCursor (dpy, XC_left_ptr);
-#endif
-
   /* the vt window */
   vt = XCreateSimpleWindow (dpy, top,
                             window_vt_x, window_vt_y,
index 29224c8..4b7c263 100644 (file)
@@ -1056,8 +1056,6 @@ struct rxvt_term : zero_initialized, rxvt_vars, rxvt_screen {
   char *          incr_buf;
   size_t          incr_buf_size, incr_buf_fill;
 /* ---------- */
-  Cursor          leftptr_cursor;
-/* ---------- */
   struct mouse_event MEvent;
   XComposeStatus  compose;
   struct termios  tio;
index 31b8718..b541b42 100644 (file)
@@ -42,7 +42,7 @@
 #include "perlxsi.c"
 
 #ifdef HAVE_SCROLLBARS
-# define GRAB_CURSOR THIS->leftptr_cursor
+# define GRAB_CURSOR THIS->scrollBar.leftptr_cursor
 #else
 # define GRAB_CURSOR None
 #endif
@@ -302,7 +302,7 @@ void overlay::set (int x, int y, SV *text, SV *rend)
 
 #define IOM_CLASS "urxvt"
 #define IOM_WARN rxvt_warn
-#include <iom_perl.h>
+#include "iom_perl.h"
 
 /////////////////////////////////////////////////////////////////////////////
 
index 08a24f9..5ef69f0 100644 (file)
@@ -120,7 +120,7 @@ rxvt_term::resize_scrollbar ()
                                            0,
                                            pix_colors[Color_fg],
                                            pix_colors[Color_border]);
-      XDefineCursor (dpy, scrollBar.win, leftptr_cursor);
+      XDefineCursor (dpy, scrollBar.win, scrollBar.leftptr_cursor);
 
       XSelectInput (dpy, scrollBar.win,
                    ExposureMask | ButtonPressMask | ButtonReleaseMask
@@ -246,6 +246,8 @@ rxvt_term::setup_scrollbar (const char *scrollalign, const char *scrollstyle, co
         scrollBar.align = R_SB_ALIGN_BOTTOM;
     }
   scrollBar.last_bot = scrollBar.last_state = -1;
+  /* cursor scrollBar: Black-on-White */
+  scrollBar.leftptr_cursor = XCreateFontCursor (dpy, XC_left_ptr);
 #endif
 }
 
index a53bf53..59afc3d 100644 (file)
@@ -21,6 +21,7 @@ typedef struct {
   int             len;
   unsigned char   align;
   Window          win;
+  Cursor          leftptr_cursor;
   int             (rxvt_term::*update)(int, int, int, int);
 
   void setIdle()   { state =  1 ; }