--- rxvt-unicode/src/rxvtperl.xs 2006/01/07 23:18:56 1.39 +++ rxvt-unicode/src/rxvtperl.xs 2006/01/08 03:07:05 1.41 @@ -38,6 +38,12 @@ #include "perlxsi.c" +#if defined(HAVE_SCROLLBARS) || defined(MENUBAR) +# define GRAB_CURSOR THIS->leftptr_cursor +#else +# define GRAB_CURSOR None +#endif + #undef LINENO #define LINENO(n) MOD (THIS->term_start + int(n), THIS->total_rows) #undef ROW @@ -737,7 +743,7 @@ CODE: XGrabButton (THIS->display->display, button, modifiers, THIS->vt, 1, ButtonPressMask | ButtonReleaseMask | EnterWindowMask | LeaveWindowMask | PointerMotionMask, - GrabModeSync, GrabModeSync, None, None); + GrabModeSync, GrabModeSync, None, GRAB_CURSOR); bool rxvt_term::grab (U32 eventtime, int sync = 0) @@ -749,7 +755,7 @@ if (!XGrabPointer (THIS->display->display, THIS->vt, 0, ButtonPressMask | ButtonReleaseMask | EnterWindowMask | LeaveWindowMask | PointerMotionMask, - mode, mode, None, None, eventtime)) + mode, mode, None, GRAB_CURSOR, eventtime)) if (!XGrabKeyboard (THIS->display->display, THIS->vt, 0, mode, mode, eventtime)) THIS->perl.grabtime = eventtime; else @@ -1158,6 +1164,42 @@ } } +bool +rxvt_term::option (U32 optval, int set = -1) + CODE: +{ + RETVAL = THIS->options & optval; + + if (set >= 0) + { + if (set) + THIS->options |= optval; + else + THIS->options &= ~optval; + + switch (optval) + { + case Opt_skipBuiltinGlyphs: + THIS->set_fonts (); + THIS->scr_remap_chars (); + THIS->scr_touch (true); + THIS->want_refresh = 1; + break; + + case Opt_cursorUnderline: + THIS->want_refresh = 1; + break; + +# case Opt_scrollBar_floating: +# case Opt_scrollBar_right: +# THIS->resize_all_windows (THIS->width, THIS->height, 1); +# break; + } + } +} + OUTPUT: + RETVAL + void rxvt_term::cur (...) PROTOTYPE: $;$$