From: root Date: Fri, 6 Jan 2006 05:28:55 +0000 (+0000) Subject: *** empty log message *** X-Git-Url: http://git.openbox.org/?a=commitdiff_plain;h=bdc0b0125d8d136c630a9be41e2179f5a5e6f1a9;p=dana%2Furxvt.git *** empty log message *** --- diff --git a/Changes b/Changes index 4efedda7..9ad43bef 100644 --- a/Changes +++ b/Changes @@ -9,6 +9,8 @@ WISH: OnTheSpot editing, or maybe switch to miiiiiiif WISH: just for fun, do shade and tint with XRender. WISH: support tex fonts +TODO: document transient_for, vt + - perl: implement additional hook: line_update, add_lines. - perl: urxvt::line now can set via ->t and ->r. diff --git a/doc/rxvt.1.pod b/doc/rxvt.1.pod index 75261bff..b057d530 100644 --- a/doc/rxvt.1.pod +++ b/doc/rxvt.1.pod @@ -437,7 +437,7 @@ used (a longer example is in F): system "@@RXVT_NAME@@ -embed $xid &"; }); -=item B<-pty-fd> I +=item B<-pty-fd> I Tells @@RXVT_NAME@@ NOT to execute any commands or create a new pty/tty pair but instead use the given filehandle as the tty master. This is @@ -448,6 +448,9 @@ If this switch is given, @@RXVT_NAME@@ will not create any utmp/wtmp entries and will not tinker with pty/tty permissions - you have to do that yourself if you want that. +As an extremely special case, specifying C<-1> will completely suppress +pty/tty operations. + Here is a example in perl that illustrates how this option can be used (a longer example is in F): diff --git a/src/command.C b/src/command.C index dcfe0cbd..1c8235f3 100644 --- a/src/command.C +++ b/src/command.C @@ -1207,7 +1207,7 @@ rxvt_term::pointer_unblank () void rxvt_term::pointer_blank () { - if (! OPTION (Opt_pointerBlank)) + if (!OPTION (Opt_pointerBlank)) return; XDefineCursor (display->display, vt, display->blank_cursor); @@ -1417,6 +1417,9 @@ rxvt_term::x_cb (XEvent &ev) } #endif + if (ev.xany.window == vt && HOOK_INVOKE ((this, HOOK_KEY_RELEASE, DT_XEVENT, &ev, DT_END))) + break; + #if defined(MOUSE_WHEEL) && defined(MOUSE_SLIP_WHEELING) if (!(ev.xkey.state & ControlMask)) slip_wheel_ev.stop (); diff --git a/src/init.C b/src/init.C index f0fcffd9..e3820804 100644 --- a/src/init.C +++ b/src/init.C @@ -1034,6 +1034,11 @@ rxvt_term::create_windows (int argc, const char *const *argv) XSetWMProtocols (disp, top, protocols, sizeof (protocols) / sizeof (protocols[0])); +#if ENABLE_FRILLS + if (rs[Rs_transient_for]) + XSetTransientForHint (disp, top, (Window)strtol (rs[Rs_transient_for], 0, 0)); +#endif + #if ENABLE_EWMH long pid = getpid (); @@ -1086,11 +1091,13 @@ rxvt_term::create_windows (int argc, const char *const *argv) vt_emask = ExposureMask | ButtonPressMask | ButtonReleaseMask | PropertyChangeMask; -#ifdef POINTER_BLANK - if (OPTION (Opt_pointerBlank)) + if (OPTION (Opt_pointerBlank) +#ifdef ENABLE_PERL + || self +#endif + ) vt_emask |= PointerMotionMask; else -#endif vt_emask |= Button1MotionMask | Button3MotionMask; XSelectInput (disp, vt, vt_emask); diff --git a/src/rsinc.h b/src/rsinc.h index 9d3717d4..8105f1e1 100644 --- a/src/rsinc.h +++ b/src/rsinc.h @@ -69,6 +69,7 @@ def (transparent_all) #endif #if ENABLE_FRILLS + def (transient_for) def (pty_fd) def (hold) def (ext_bwidth) diff --git a/src/rxvtlib.h.in b/src/rxvtlib.h.in index 4e9eed10..a0801cec 100644 --- a/src/rxvtlib.h.in +++ b/src/rxvtlib.h.in @@ -224,7 +224,11 @@ typedef struct { #define Opt_scrollWithBuffer (1UL<<15) #define Opt_jumpScroll (1UL<<16) #define Opt_mouseWheelScrollPage (1UL<<17) -#define Opt_pointerBlank (1UL<<18) +#if POINTER_BLANK +# define Opt_pointerBlank (1UL<<18) +#else +# define Opt_pointerBlank 0 +#endif #define Opt_cursorBlink (1UL<<19) #define Opt_secondaryScreen (1UL<<20) #define Opt_secondaryScroll (1UL<<21) diff --git a/src/rxvtperl.xs b/src/rxvtperl.xs index 52faafd6..e636c8c4 100644 --- a/src/rxvtperl.xs +++ b/src/rxvtperl.xs @@ -503,6 +503,8 @@ rxvt_perl_interp::invoke (rxvt_term *term, hook_type htype, ...) setiv (time, xe->xmotion.time); setiv (x, xe->xmotion.x); setiv (y, xe->xmotion.y); + setiv (row, xe->xmotion.y / term->fheight); + setiv (col, xe->xmotion.x / term->fwidth); setiv (x_root, xe->xmotion.x_root); setiv (y_root, xe->xmotion.y_root); setiv (state, xe->xmotion.state); @@ -796,6 +798,13 @@ rxvt_term::width () OUTPUT: RETVAL +U32 +rxvt_term::vt () + CODE: + RETVAL = THIS->vt; + OUTPUT: + RETVAL + U32 rxvt_term::rstyle (U32 new_rstyle = THIS->rstyle) CODE: diff --git a/src/urxvt.pm b/src/urxvt.pm index 9d5000e4..f0e08c83 100644 --- a/src/urxvt.pm +++ b/src/urxvt.pm @@ -273,9 +273,12 @@ resource in the @@RXVT_NAME@@(1) manpage). =item on_motion_notify $term, $event -Called whenever the corresponding X event is received for the terminal -(see the XEvent manpage) If the hook returns true, then the even will be -ignored by rxvt-unicode. +Called whenever the corresponding X event is received for the terminal If +the hook returns true, then the even will be ignored by rxvt-unicode. + +The event is a hash with most values as named by Xlib (see the XEvent +manpage), with the additional members C and C, which are the row +and column under the mouse cursor. C additionally receives the string rxvt-unicode would output, if any, in locale-specific encoding. diff --git a/src/xdefaults.C b/src/xdefaults.C index b63521f5..b614d8cd 100644 --- a/src/xdefaults.C +++ b/src/xdefaults.C @@ -227,6 +227,7 @@ optList[] = { STRG (Rs_embed, NULL, "embed", "windowid", "window id to embed terminal in"), #endif #if ENABLE_FRILLS + RSTRG (Rs_transient_for, "transient-for", "windowid"), STRG (Rs_pty_fd, NULL, "pty-fd", "fileno", "file descriptor of pty to use"), BOOL (Rs_hold, "hold", "hold", Opt_hold, "retain window after shell exit"), STRG (Rs_ext_bwidth, "externalBorder", "w", "number", "external border in pixels"),