*** empty log message ***
authorroot <root>
Fri, 6 Jan 2006 05:28:55 +0000 (05:28 +0000)
committerroot <root>
Fri, 6 Jan 2006 05:28:55 +0000 (05:28 +0000)
Changes
doc/rxvt.1.pod
src/command.C
src/init.C
src/rsinc.h
src/rxvtlib.h.in
src/rxvtperl.xs
src/urxvt.pm
src/xdefaults.C

diff --git a/Changes b/Changes
index 4efedda7db4e4ba2948ccc45353d89f76900d3c7..9ad43bef656eb2cf9881ac79eecfd05590d2b4b9 100644 (file)
--- 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.
 
index 75261bff868d4ed836d70d40aa4b0ba62439a5b3..b057d530bf60de9587c5f81b254e632dbb81b167 100644 (file)
@@ -437,7 +437,7 @@ used (a longer example is in F<doc/embed>):
       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
@@ -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<doc/pty-fd>):
 
index dcfe0cbd79635a619fb405dd07963ae0bbc309ec..1c8235f315ee4e94e31aea99b23bc432ec979dff 100644 (file)
@@ -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 ();
index f0fcffd975048270f932ee5fe90869dd91e54e9a..e38208040ca18cc4a14bbc253c1ac9d5a53e7947 100644 (file)
@@ -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);
index 9d3717d4ea99030b2464ce19ff76da083ea28e55..8105f1e1f7cc2e88077218d1d79d51468d5044a5 100644 (file)
@@ -69,6 +69,7 @@
   def (transparent_all)
 #endif
 #if ENABLE_FRILLS
+  def (transient_for)
   def (pty_fd)
   def (hold)
   def (ext_bwidth)
index 4e9eed10dcd93ea7b779c420ab51a27e7f0d06c3..a0801ceca406c00b8127c0e6414a4d84f758937e 100644 (file)
@@ -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)
index 52faafd6ce1df2afac969dfc52f024277e7d4bb4..e636c8c4d370bc4aae10f0a0e0b04f021b211903 100644 (file)
@@ -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:
index 9d5000e42427b663dcd2342404e28eb171831e97..f0e08c83fa1d03f02e7b76b1566d688fa89b4e5a 100644 (file)
@@ -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<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.
index b63521f542bdfb40b55df7a429d1293ab6fa7103..b614d8cd63e23f32be3eb5a8543e2d9307636d89 100644 (file)
@@ -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"),