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.
system "@@RXVT_NAME@@ -embed $xid &";
});
-=item B<-pty-fd> I<fileno>
+=item B<-pty-fd> I<file descriptor>
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
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<doc/pty-fd>):
void
rxvt_term::pointer_blank ()
{
- if (! OPTION (Opt_pointerBlank))
+ if (!OPTION (Opt_pointerBlank))
return;
XDefineCursor (display->display, vt, display->blank_cursor);
}
#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 ();
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 ();
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);
def (transparent_all)
#endif
#if ENABLE_FRILLS
+ def (transient_for)
def (pty_fd)
def (hold)
def (ext_bwidth)
#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)
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);
OUTPUT:
RETVAL
+U32
+rxvt_term::vt ()
+ CODE:
+ RETVAL = THIS->vt;
+ OUTPUT:
+ RETVAL
+
U32
rxvt_term::rstyle (U32 new_rstyle = THIS->rstyle)
CODE:
=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<row> and C<col>, which are the row
+and column under the mouse cursor.
C<on_key_press> additionally receives the string rxvt-unicode would
output, if any, in locale-specific encoding.
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"),