*** empty log message ***
authorroot <root>
Tue, 4 Nov 2008 22:44:09 +0000 (22:44 +0000)
committerroot <root>
Tue, 4 Nov 2008 22:44:09 +0000 (22:44 +0000)
Changes
doc/etc/rxvt-unicode.termcap
doc/etc/rxvt-unicode.terminfo
doc/rxvt.1.man.in
doc/rxvtperl.3.man.in
src/command.C
src/rxvt.h
src/screen.C

diff --git a/Changes b/Changes
index 28a58288b48ee47a41ae27830c44504814c22130..828069134f8f0c5a600cb3169077d416b2385ddf 100644 (file)
--- a/Changes
+++ b/Changes
@@ -49,6 +49,12 @@ TODO: tput reset, reset more stuff/mouse reporting
           to save memory in the common case of not using visual gimmicks.
         - try to work around a race between urxvt and wm's on programmatic
           resizes by temporarily disabling size hints.
+        - implement the DECSTR soft reset sequence and use it for tput init,
+          and make hard RIS and DECSTR both reset more private modes, such
+          as mouse reporting.
+        - redundantly clear mouse reporting and a few other states in
+          tput init/tput reset, for older urxvts.
+        - no longer clear the screen in tput init.
 
 9.05 Sun Jun 15 20:09:20 CEST 2008
        - new option --cd/chdir to set the starting working directory.
index 9f0dbb901780afec088986ceb5eac8807ca2cd55..d6b828938f6dc8597ca7370e93b23c73b9c4cbc3 100644 (file)
@@ -9,8 +9,8 @@ rxvt-unicode|rxvt-unicode terminal (X Window System):\
        :as=\E(0:bl=^G:cd=\E[J:ce=\E[K:cl=\E[H\E[2J:\
        :cm=\E[%i%d;%dH:cr=^M:cs=\E[%i%d;%dr:ct=\E[3g:dc=\E[P:\
        :dl=\E[M:do=^J:ds=\E]2;\007:ec=\E[%dX:ei=\E[4l:fs=^G:\
-       :ho=\E[H:i1=\E[?47l\E=\E[?1l:ic=\E[@:im=\E[4h:\
-       :is=\E[r\E[m\E[2J\E[H\E[?7h\E[?1;3;4;6l\E[4l:\
+       :ho=\E[H:i1=\E[!p:ic=\E[@:im=\E[4h:\
+       :is=\E[m\E[?7;25h\E[?1;3;4;5;6;7;9;66;1000;1001;1049l\E[4l:\
        :k1=\E[11~:k2=\E[12~:k3=\E[13~:k4=\E[14~:k5=\E[15~:\
        :k6=\E[17~:k7=\E[18~:k8=\E[19~:k9=\E[20~:kD=\E[3~:\
        :kI=\E[2~:kN=\E[6~:kP=\E[5~:kb=\177:kd=\E[B:ke=\E>:\
index 702069754b9c3ade6e4a239ee0b65681c4a6921a..774b76a4d26f998a583200381de7693c548b5005 100644 (file)
@@ -1,6 +1,7 @@
 # From: Thomas Dickey <dickey@clark.net> 04 Oct 1997
 # Updated: Özgür Kesim <kesim@math.fu-berlin.de> 02 Nov 1997
 # Updated: Marc Lehmann <pcg@goof.com>, 17 Feb 2005
+# Updated: Marc Lehmann <schmorp@schmorp.de>, 04 Nov 2008: change init/reset sequences
 rxvt-unicode|rxvt-unicode terminal (X Window System),
        am,
        bce,
@@ -48,8 +49,8 @@ rxvt-unicode|rxvt-unicode terminal (X Window System),
        il=\E[%p1%dL,
        il1=\E[L,
        ind=^J,
-       is1=\E[?47l\E=\E[?1l,
-       is2=\E[r\E[m\E[2J\E[H\E[?7h\E[?1;3;4;6l\E[4l,
+       is1=\E[\041p,
+       is2=\E[r\E[m\E[?7;25h\E[?1;3;4;5;6;7;9;66;1000;1001;1049l\E[4l,
        kDC=\E[3$,
        kIC=\E2$,
        kEND=\E[8$,
@@ -105,8 +106,8 @@ rxvt-unicode|rxvt-unicode terminal (X Window System),
        ri=\EM,
        rmso=\E[27m,
        rmul=\E[24m,
-       rs1=\Ec,
-       rs2=\E[r\E[m\E[2J\E[H\E[?7h\E[?1;3;4;6l\E[4l\E>,
+       rs1=\E[c,
+       rs2=\E[r\E[m\E[?7;25h\E[?1;3;4;5;6;7;9;66;1000;1001;1049l\E[4l,
        sgr0=\E[m\017,
        enacs=,
        smacs=\E(0,
index cb259c41d3ec54a06bd34900249f7408e8dfae9b..12c1c4b372ed28e9836f3b40f822dba84b51f4cf 100644 (file)
 .\" ========================================================================
 .\"
 .IX Title "@@RXVT_NAME@@ 1"
-.TH @@RXVT_NAME@@ 1 "2008-06-15" "@@RXVT_VERSION@@" "RXVT-UNICODE"
+.TH @@RXVT_NAME@@ 1 "2008-11-04" "@@RXVT_VERSION@@" "RXVT-UNICODE"
 .\" For nroff, turn off justification.  Always turn off hyphenation; it makes
 .\" way too many mistakes in technical documents.
 .if n .ad l
@@ -302,6 +302,11 @@ horizontal radii are considered to be the same. Setting one of the
 radii to 1 and another to a large number creates interesting effects
 on some backgrounds. Maximum radius value is 128. Compile \fIafterimage\fR;
 resource \fIblurRadius\fR.
+.IP "\fB\-icon\fR \fIfile\fR" 4
+.IX Item "-icon file"
+Compile \fIafterimage\fR: Use the specified image as application icon. This
+is used by many window managers, taskbars and pagers to represent the
+appliation window; resource \fIiconFile\fR.
 .IP "\fB\-bg\fR \fIcolour\fR" 4
 .IX Item "-bg colour"
 Window background colour; resource \fBbackground\fR.
@@ -434,7 +439,8 @@ and \fB\-borderwidth\fR. See resource entry for limits; resource
 .IX Item "-bl"
 Compile \fIfrills\fR: Set \s-1MWM\s0 hints to request a borderless window, i.e.
 if honoured by the \s-1WM\s0, the rxvt-unicode window will not have window
-decorations; resource \fBborderLess\fR.
+decorations; resource \fBborderLess\fR. If the window manager does not
+support \s-1MWM\s0 hints (e.g. kwin), enables override-redirect mode.
 .IP "\fB\-override\-redirect\fR" 4
 .IX Item "-override-redirect"
 Compile \fIfrills\fR: Sets override-redirect on the window; resource
@@ -765,8 +771,11 @@ in addition to tinting it; option \fB\-sh\fR.
 Specify background blending type; option \fB\-blt\fR.
 .IP "\fBblurRadius:\fR \fInumber\fR" 4
 .IX Item "blurRadius: number"
-Apply Gaussian Blurr with the specified radius to the transparent
+Apply gaussian blur with the specified radius to the transparent
 background image; option \fB\-blr\fR.
+.IP "\fBiconFile:\fR \fIfile\fR" 4
+.IX Item "iconFile: file"
+Set the application icon pixmap; option \fB\-icon\fR.
 .IP "\fBscrollColor:\fR \fIcolour\fR" 4
 .IX Item "scrollColor: colour"
 Use the specified colour for the scrollbar [default #B2B2B2].
@@ -897,6 +906,8 @@ de-iconify (map) on receipt of a bell character [default].
 .IX Item "urgentOnBell: boolean"
 \&\fBTrue\fR: set the urgency hint for the wm on receipt of a bell character.
 \&\fBFalse\fR: do not set the urgency hint [default].
+.Sp
+@@RXVT_NAME@@ resets the urgency hint on every focus change.
 .IP "\fBvisualBell:\fR \fIboolean\fR" 4
 .IX Item "visualBell: boolean"
 \&\fBTrue\fR: use visual bell on receipt of a bell character; option \fB\-vb\fR.
@@ -1247,15 +1258,13 @@ all instances, while \fBperl-ext\fR is used for specific instances.
 .IP "\fBperl-eval\fR: \fIstring\fR" 4
 .IX Item "perl-eval: string"
 Perl code to be evaluated when all extensions have been registered. See
-the @@RXVT_NAME@@\fIperl\fR\|(3) manpage. Due to security reasons, this resource
-will be ignored when running setuid/setgid.
+the @@RXVT_NAME@@\fIperl\fR\|(3) manpage.
 .IP "\fBperl-lib\fR: \fIpath\fR" 4
 .IX Item "perl-lib: path"
 Colon-separated list of additional directories that hold extension
 scripts. When looking for extensions specified by the \f(CW\*(C`perl\*(C'\fR resource,
 @@RXVT_NAME@@ will first look in these directories and then in
-\&\fI@@RXVT_LIBDIR@@/urxvt/perl/\fR. Due to security reasons, this resource
-will be ignored when running setuid/setgid.
+\&\fI@@RXVT_LIBDIR@@/urxvt/perl/\fR.
 .Sp
 See the @@RXVT_NAME@@\fIperl\fR\|(3) manpage.
 .IP "\fBselection.pattern\-\f(BIidx\fB\fR: \fIperl-regex\fR" 4
index ead8dacebf972f46be3860208e4625b7fb54a73f..505c9e01c1bc2ec80a3915ef0af1d9e28f5877dd 100644 (file)
 .\" ========================================================================
 .\"
 .IX Title "@@RXVT_NAME@@ 3"
-.TH @@RXVT_NAME@@ 3 "2008-06-15" "@@RXVT_VERSION@@" "RXVT-UNICODE"
+.TH @@RXVT_NAME@@ 3 "2008-11-04" "@@RXVT_VERSION@@" "RXVT-UNICODE"
 .\" For nroff, turn off justification.  Always turn off hyphenation; it makes
 .\" way too many mistakes in technical documents.
 .if n .ad l
@@ -252,7 +252,7 @@ will be called when the toggle changes, with the new boolean value as
 first argument.
 .Sp
 The following will add an entry \f(CW\*(C`myoption\*(C'\fR that changes
-\&\f(CW\*(C`$self\-\*(C'\fR{myoption}>:
+\&\f(CW\*(C`$self\->{myoption}\*(C'\fR:
 .Sp
 .Vb 3
 \&   push @{ $self\->{term}{option_popup_hook} }, sub {
@@ -684,29 +684,44 @@ than the scroll back buffer or the terminal.
 It is called before lines are scrolled out (so rows 0 .. min ($lines \- 1,
 \&\f(CW$nrow\fR \- 1) represent the lines to be scrolled out). \f(CW$saved\fR is the total
 number of lines that will be in the scrollback buffer.
-.ie n .IP "on_osc_seq $term\fR, \f(CW$op\fR, \f(CW$args" 4
-.el .IP "on_osc_seq \f(CW$term\fR, \f(CW$op\fR, \f(CW$args\fR" 4
-.IX Item "on_osc_seq $term, $op, $args"
+.ie n .IP "on_osc_seq $term\fR, \f(CW$op\fR, \f(CW$args\fR, \f(CW$resp" 4
+.el .IP "on_osc_seq \f(CW$term\fR, \f(CW$op\fR, \f(CW$args\fR, \f(CW$resp\fR" 4
+.IX Item "on_osc_seq $term, $op, $args, $resp"
 Called on every \s-1OSC\s0 sequence and can be used to suppress it or modify its
-behaviour.  The default should be to return an empty list. A true value
+behaviour. The default should be to return an empty list. A true value
 suppresses execution of the request completely. Make sure you don't get
-confused by recursive invocations when you output an osc sequence within
+confused by recursive invocations when you output an \s-1OSC\s0 sequence within
 this callback.
 .Sp
 \&\f(CW\*(C`on_osc_seq_perl\*(C'\fR should be used for new behaviour.
-.ie n .IP "on_osc_seq_perl $term\fR, \f(CW$string" 4
-.el .IP "on_osc_seq_perl \f(CW$term\fR, \f(CW$string\fR" 4
-.IX Item "on_osc_seq_perl $term, $string"
+.ie n .IP "on_osc_seq_perl $term\fR, \f(CW$args\fR, \f(CW$resp" 4
+.el .IP "on_osc_seq_perl \f(CW$term\fR, \f(CW$args\fR, \f(CW$resp\fR" 4
+.IX Item "on_osc_seq_perl $term, $args, $resp"
 Called whenever the \fB\s-1ESC\s0 ] 777 ; string \s-1ST\s0\fR command sequence (\s-1OSC\s0 =
 operating system command) is processed. Cursor position and other state
 information is up-to-date when this happens. For interoperability, the
-string should start with the extension name and a colon, to distinguish
-it from commands for other extensions, and this might be enforced in the
-future.
+string should start with the extension name (sans \-osc) and a semicolon,
+to distinguish it from commands for other extensions, and this might be
+enforced in the future.
+.Sp
+For example, \f(CW\*(C`overlay\-osc\*(C'\fR uses this:
+.Sp
+.Vb 2
+\&   sub on_osc_seq_perl {
+\&      my ($self, $osc, $resp) = @_;
+\&
+\&      return unless $osc =~ s/^overlay;//;
+\&
+\&      ... process remaining $osc string
+\&   }
+.Ve
 .Sp
 Be careful not ever to trust (in a security sense) the data you receive,
 as its source can not easily be controlled (e\-mail content, messages from
 other users on the same system etc.).
+.Sp
+For responses, \f(CW$resp\fR contains the end-of-args separator used by the
+sender.
 .ie n .IP "on_add_lines $term\fR, \f(CW$string" 4
 .el .IP "on_add_lines \f(CW$term\fR, \f(CW$string\fR" 4
 .IX Item "on_add_lines $term, $string"
@@ -737,8 +752,8 @@ you cannot just toggle rendition bits, but only set them.
 .ie n .IP "on_refresh_begin $term" 4
 .el .IP "on_refresh_begin \f(CW$term\fR" 4
 .IX Item "on_refresh_begin $term"
-Called just before the screen gets redrawn. Can be used for overlay
-or similar effects by modify terminal contents in refresh_begin, and
+Called just before the screen gets redrawn. Can be used for overlay or
+similar effects by modifying the terminal contents in refresh_begin, and
 restoring them in refresh_end. The built-in overlay and selection display
 code is run after this hook, and takes precedence.
 .ie n .IP "on_refresh_end $term" 4
@@ -1140,12 +1155,14 @@ as long as the perl object is referenced.
 .Sp
 The methods currently supported on \f(CW\*(C`urxvt::overlay\*(C'\fR objects are:
 .RS 4
-.ie n .IP "$overlay\fR\->set ($x, \f(CW$y\fR, \f(CW$text\fR, \f(CW$rend)" 4
-.el .IP "\f(CW$overlay\fR\->set ($x, \f(CW$y\fR, \f(CW$text\fR, \f(CW$rend\fR)" 4
-.IX Item "$overlay->set ($x, $y, $text, $rend)"
+.ie n .IP "$overlay\fR\->set ($x, \f(CW$y\fR, \f(CW$text\fR[, \f(CW$rend])" 4
+.el .IP "\f(CW$overlay\fR\->set ($x, \f(CW$y\fR, \f(CW$text\fR[, \f(CW$rend\fR])" 4
+.IX Item "$overlay->set ($x, $y, $text[, $rend])"
 Similar to \f(CW\*(C`$term\->ROW_t\*(C'\fR and \f(CW\*(C`$term\->ROW_r\*(C'\fR in that it puts
 text in rxvt-unicode's special encoding and an array of rendition values
 at a specific position inside the overlay.
+.Sp
+If \f(CW$rend\fR is missing, then the rendition will not be changed.
 .ie n .IP "$overlay\->hide" 4
 .el .IP "\f(CW$overlay\fR\->hide" 4
 .IX Item "$overlay->hide"
index b68b43ad23436494d52a1353fe71eb9e3864eb77..cac40b3ccac80d7226989cc94b239cad6235d94b 100644 (file)
@@ -2690,17 +2690,17 @@ rxvt_term::process_escape_seq ()
         tt_write (ESCZ_ANSWER, sizeof (ESCZ_ANSWER) - 1);
         break;                 /* steal obsolete ESC [ c */
 
-        /* 8.3.16: CONTROL SEQUENCE INTRODUCER */
+        /* 8.3.16: CONTROL SEQUENCE INTRODUCER (CSI) */
       case C1_CSI:             /* ESC [ */
         process_csi_seq ();
         break;
 
-        /* 8.3.90: OPERATING SYSTEM COMMAND */
+        /* 8.3.90: OPERATING SYSTEM COMMAND (OSC) */
       case C1_OSC:             /* ESC ] */
         process_osc_seq ();
         break;
 
-        /* 8.3.106: RESET TO INITIAL STATE */
+        /* 8.3.106: RESET TO INITIAL STATE (RIS) */
       case 'c':
         mbstate.reset ();
         scr_poweron ();
@@ -2765,9 +2765,9 @@ rxvt_term::process_csi_seq ()
 
   priv = 0;
   ch = cmd_getc ();
-  if (ch >= '<' && ch <= '?')
+  if ((ch >= '<' && ch <= '?') || ch == '!')
     {
-      /* '<' '=' '>' '?' */
+      /* '<' '=' '>' '?' '!' */
       priv = ch;
       ch = cmd_getc ();
     }
@@ -2831,7 +2831,22 @@ rxvt_term::process_csi_seq ()
             if (ch == 'h' || ch == 'l' || ch == 'r' || ch == 's' || ch == 't')
               process_terminal_mode (ch, priv, nargs, arg);
             break;
+
+          case '!':
+            if (ch == CSI_70)
+              {
+                /* DECSTR: soft terminal reset, used by our terminfo since 9.06 */
+                scr_soft_reset ();
+
+                static const int pm_h[] = { 7, 25 };
+                static const int pm_l[] = { 1, 3, 4, 5, 6, 7, 9, 66, 1000, 1001, 1049 };
+
+                process_terminal_mode ('h', 0, sizeof (pm_h) / sizeof (pm_h[0]), pm_h);
+                process_terminal_mode ('l', 0, sizeof (pm_l) / sizeof (pm_l[0]), pm_l);
+              }
+          break;
         }
+
       return;
     }
 
index 2d0c2fbbc33ceb3cf6c0c6f585c9b2eb580c4171..3fa5f83c9cfb2c36e3d6cd5b67a13b8c5bb8d2a3 100644 (file)
@@ -1377,6 +1377,7 @@ struct rxvt_term : zero_initialized, rxvt_vars, rxvt_screen {
   enum cursor_mode { SAVE, RESTORE };
 
   void scr_poweron ();
+  void scr_soft_reset () NOTHROW;
   void scr_cursor (cursor_mode mode) NOTHROW;
   void scr_do_wrap () NOTHROW;
   void scr_swap_screen () NOTHROW;
index 8d0007565a163547ae8e071ca1fa19f48504951c..f45eaaaf9fa719f2e32562de3aa27c06780f7a0d 100644 (file)
@@ -160,11 +160,6 @@ rxvt_term::scr_kill_char (line_t &l, int col) const NOTHROW
 void
 rxvt_term::scr_reset ()
 {
-#if ENABLE_OVERLAY
-  scr_overlay_off ();
-#endif
-
-  rvideo_mode = false;
   view_start = 0;
   num_scr = 0;
 
@@ -177,9 +172,6 @@ rxvt_term::scr_reset ()
   if (ncol == prev_ncol && nrow == prev_nrow)
     return;
 
-  if (current_screen != PRIMARY)
-    scr_swap_screen ();
-
   // we need at least two lines for wrapping to work correctly
   while (nrow + saveLines < 2)
     {
@@ -401,8 +393,6 @@ rxvt_term::scr_reset ()
 
       clamp_it (screen.cur.row, 0, nrow - 1);
       clamp_it (screen.cur.col, 0, ncol - 1);
-
-      free (tabs);
     }
 
   CLEAR_ALL_SELECTION ();
@@ -410,14 +400,6 @@ rxvt_term::scr_reset ()
   prev_nrow = nrow;
   prev_ncol = ncol;
 
-  tabs = (char *)rxvt_malloc (ncol);
-
-  for (int col = ncol; --col; )
-    tabs [col] = col % TABSIZE == 0;
-
-  if (current_screen != PRIMARY)
-    scr_swap_screen ();
-
   tt_winch ();
 
   HOOK_INVOKE ((this, HOOK_RESET, DT_END));
@@ -438,27 +420,56 @@ rxvt_term::scr_release () NOTHROW
       free (row_buf);
       free (swap_buf);
       free (drawn_buf);
-      free (tabs);
+      row_buf = 0; // signal that we freed all the arrays above
 
-      row_buf = 0; // signal that we freed all the arrays
+      free (tabs);
+      tabs = 0;
     }
 }
 
 /* ------------------------------------------------------------------------- */
 /*
- * Hard reset
+ * Hard/Soft reset
  */
 void
 rxvt_term::scr_poweron ()
 {
   scr_release ();
   prev_nrow = prev_ncol = 0;
+  scr_soft_reset ();
   scr_reset ();
 
   scr_clear (true);
   scr_refresh ();
 }
 
+void
+rxvt_term::scr_soft_reset ()
+{
+  /* only affects modes, nothing drastic such as clearing the screen */
+#if ENABLE_OVERLAY
+  scr_overlay_off ();
+#endif
+
+  rvideo_mode = false;
+
+  if (current_screen != PRIMARY)
+    scr_swap_screen ();
+
+  free (tabs);
+  tabs = (char *)rxvt_malloc (ncol);
+
+  for (int col = ncol; --col; )
+    tabs [col] = col % TABSIZE == 0;
+
+  if (current_screen != PRIMARY)
+    scr_swap_screen ();
+
+  scr_scroll_region (0, MAX_ROWS - 1);
+  scr_rendition (0, ~RS_None);
+  scr_insert_mode (0);
+}
+
 /* ------------------------------------------------------------------------- *
  *                         PROCESS SCREEN COMMANDS                           *
  * ------------------------------------------------------------------------- */