From: ayin Date: Fri, 4 Jan 2008 17:57:28 +0000 (+0000) Subject: Move leftptr_cursor from rxvt_term to scrollBar_t. X-Git-Url: http://git.openbox.org/?a=commitdiff_plain;h=f90b0ef22559e20c2133a7af5edbefd4825ea7b8;p=dana%2Furxvt.git Move leftptr_cursor from rxvt_term to scrollBar_t. --- diff --git a/src/init.C b/src/init.C index b71f23f2..b470ce1c 100644 --- a/src/init.C +++ b/src/init.C @@ -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, diff --git a/src/rxvt.h b/src/rxvt.h index 29224c8a..4b7c2632 100644 --- a/src/rxvt.h +++ b/src/rxvt.h @@ -1055,8 +1055,6 @@ struct rxvt_term : zero_initialized, rxvt_vars, rxvt_screen { pid_t cmd_pid; /* process id of child */ char * incr_buf; size_t incr_buf_size, incr_buf_fill; -/* ---------- */ - Cursor leftptr_cursor; /* ---------- */ struct mouse_event MEvent; XComposeStatus compose; diff --git a/src/rxvtperl.xs b/src/rxvtperl.xs index 31b87182..b541b427 100644 --- a/src/rxvtperl.xs +++ b/src/rxvtperl.xs @@ -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 +#include "iom_perl.h" ///////////////////////////////////////////////////////////////////////////// diff --git a/src/scrollbar.C b/src/scrollbar.C index 08a24f94..5ef69f08 100644 --- a/src/scrollbar.C +++ b/src/scrollbar.C @@ -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 } diff --git a/src/scrollbar.h b/src/scrollbar.h index a53bf53b..59afc3df 100644 --- a/src/scrollbar.h +++ b/src/scrollbar.h @@ -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 ; }