[Pkg-urxvt-maintainers] Bug#753280: rxvt-unicode-256color: patches to add ibeam cursor and disable XON on startup

Facundo Aguirre facundo at creativadigital.com.ar
Mon Jun 30 03:38:20 UTC 2014


Package: rxvt-unicode-256color
Version: 9.20-1.1
Severity: wishlist
Tags: patch

Dear Maintainer,

Hi, i'm sending two patches that i hope you find useful.

The first adds an I-beam cursor (echo -ne "\033[5 q").

The other disables XON on startup, so Ctrl-Q and Ctrl-S are immediately
available for all applications without further configuration.

Cheers,
Facundo


-- System Information:
Debian Release: jessie/sid
  APT prefers testing
  APT policy: (800, 'testing'), (700, 'unstable'), (500, 'stable'), (1, 'experimental')
Architecture: amd64 (x86_64)
Foreign Architectures: i386

Kernel: Linux 3.14-rc7-amd64 (SMP w/4 CPU cores)
Locale: LANG=es_AR.UTF-8, LC_CTYPE=es_AR.UTF-8 (charmap=UTF-8) (ignored: LC_ALL set to es_AR.UTF-8)
Shell: /bin/sh linked to /bin/dash

Versions of packages rxvt-unicode-256color depends on:
ii  base-passwd               3.5.28
ii  libc6                     2.19-4
ii  libfontconfig1            2.11.0-5
ii  libfreetype6              2.5.2-1
ii  libgcc1                   1:4.9.0-7
ii  libgdk-pixbuf2.0-0        2.30.7-1
ii  libglib2.0-0              2.40.0-3
ii  libperl5.18               5.18.2-4
ii  libstartup-notification0  0.12-3
ii  libx11-6                  2:1.6.2-2
ii  libxft2                   2.3.1-2
ii  libxrender1               1:0.9.8-1
ii  ncurses-term              5.9+20140118-1

Versions of packages rxvt-unicode-256color recommends:
ii  fonts-vlgothic [fonts-japanese-gothic]  20140530-1
ii  ttf-dejavu                              2.34-1

rxvt-unicode-256color suggests no packages.

-- no debconf information
-------------- next part --------------
diff -Nru rxvt-unicode-9.20/debian/changelog rxvt-unicode-9.20/debian/changelog
--- rxvt-unicode-9.20/debian/changelog	2014-06-29 22:36:34.000000000 -0300
+++ rxvt-unicode-9.20/debian/changelog	2014-05-02 23:39:02.000000000 -0300
@@ -1,11 +1,3 @@
-rxvt-unicode (9.20-1.1) UNRELEASED; urgency=medium
-
-  * Non-maintainer upload.
-  * Add ibeam cursor (13_ibeam_cursor.diff)
-  * Disable XON on startup (14_disable_xon.diff)
-
- -- Facundo Aguirre <facundo at creativadigital.com.ar>  Sun, 29 Jun 2014 22:34:49 -0300
-
 rxvt-unicode (9.20-1) unstable; urgency=high
 
   * Imported Upstream version 9.20 (Closes: #746593)
diff -Nru rxvt-unicode-9.20/debian/patches/13_ibeam_cursor.diff rxvt-unicode-9.20/debian/patches/13_ibeam_cursor.diff
--- rxvt-unicode-9.20/debian/patches/13_ibeam_cursor.diff	2014-06-29 22:35:38.000000000 -0300
+++ rxvt-unicode-9.20/debian/patches/13_ibeam_cursor.diff	1969-12-31 21:00:00.000000000 -0300
@@ -1,182 +0,0 @@
---- rxvt-unicode-9.20.orig/src/command.C
-+++ rxvt-unicode-9.20/src/command.C
-@@ -2830,6 +2830,7 @@
-   unsigned int nargs, p;
-   int n, ndef;
-   int arg[ESC_ARGS] = { };
-+  int space_arg = -1;
- 
-   nargs = 0;
- 
-@@ -2861,6 +2862,9 @@
-         }
-       else if (IS_CONTROL (ch))
-         process_nonprinting (ch);
-+      else if (ch == ' ') {
-+        space_arg = nargs;
-+      }
- 
-       prev_ch = ch;
-       ch = cmd_getc ();
-@@ -3106,9 +3110,11 @@
-           priv_modes |= PrivMode_LFNL;
-         break;
- 
--      case CSI_71:		// DESCUSR: set cursor style
--        if (prev_ch == ' ')
--          set_cursor_style (arg[0]);
-+      case CSI_71:
-+        // space arg (CSI Ps SP q) is for "Set cursor style (DECSURS, VT520) specification"
-+        // without   (CSI Ps q) sits for "Load LEDs (DECLL)"
-+        if (space_arg == 0)
-+          this->set_cursor_style (arg[0]);
-         break;
- 
-         /*
-@@ -4029,17 +4035,47 @@
- void
- rxvt_term::set_cursor_style (int style)
- {
--  if (!IN_RANGE_INC (style, 0, 4))
--    return;
--
--  set_option (Opt_cursorUnderline, style >= 3);
-+  switch (style)
-+    {
-+      case 3: // Blinking Underline
-+      case 4: // Steady Underline
-+#ifdef ENABLE_CURSORSHAPE
-+        screen.cursorShape = 1;
-+        set_option (Opt_cursorUnderline, 0);
-+#else
-+        set_option (Opt_cursorUnderline, 1);
-+#endif
-+#ifdef CURSOR_BLINK
-+        set_option (Opt_cursorBlink, style==3?1:0);
-+#endif
-+        break;
- 
-+      case 5: // Blinking Bar
-+      case 6: // Steady Bar
-+        set_option (Opt_cursorUnderline, 0);
-+#ifdef ENABLE_CURSORSHAPE
-+        screen.cursorShape = 2;
-+#endif
- #ifdef CURSOR_BLINK
--  set_option (Opt_cursorBlink, !style || (style & 1));
--  cursor_blink_reset ();
-+        set_option (Opt_cursorBlink, style==5?1:0);
- #endif
-+        break;
- 
--  want_refresh = 1;
-+      case 0: // Blinking Block
-+      case 1: // Blinking Block
-+      case 2: // Steady Block
-+      default:
-+#ifdef ENABLE_CURSORSHAPE
-+        screen.cursorShape = 0;
-+#endif
-+        set_option (Opt_cursorUnderline, 0);
-+#ifdef CURSOR_BLINK
-+        set_option (Opt_cursorBlink, style==2?0:1);
-+#endif
-+  }
-+#ifdef CURSOR_BLINK
-+  this->cursor_blink_reset ();
-+#endif
- }
- /*}}} */
- 
---- rxvt-unicode-9.20.orig/src/rxvt.h
-+++ rxvt-unicode-9.20/src/rxvt.h
-@@ -62,6 +62,7 @@
- # define CURSOR_BLINK         1
- # define OPTION_HC            1
- # define BUILTIN_GLYPHS       1
-+# define ENABLE_CURSORSHAPE   1
- #else
- # define ENABLE_MINIMAL 1
- #endif
-@@ -1022,6 +1023,9 @@
-   unsigned int    s_charset;    /* saved character set number [0..3]         */
-   char            s_charset_char;
-   rend_t          s_rstyle;     /* saved rendition style                     */
-+#if ENABLE_CURSORSHAPE
-+  int             cursorShape;
-+#endif
- };
- 
- enum selection_op_t
---- rxvt-unicode-9.20.orig/src/screen.C
-+++ rxvt-unicode-9.20/src/screen.C
-@@ -2123,7 +2123,11 @@
-         if (focus)
-           {
-             rend_t rend = cur_rend;
--
-+#ifdef ENABLE_CURSORSHAPE
-+            if (screen.cursorShape)
-+              rend ^= RS_RVid;
-+            else
-+#endif
-             if (option (Opt_cursorUnderline))
-               rend ^= RS_Uline;
-             else
-@@ -2249,6 +2253,9 @@
-       for (col = 0; col < ncol; col++)
-         {
-           /* compare new text with old - if exactly the same then continue */
-+#ifdef ENABLE_CURSORSHAPE
-+          bool isCursorShaped = (showcursor && screen.cursorShape && col==screen.cur.col && row==screen.cur.row);
-+#endif
-           if (stp[col] == dtp[col]    /* Must match characters to skip. */
-               && (RS_SAME (srp[col], drp[col])    /* Either rendition the same or   */
-                   || (stp[col] == ' ' /* space w/ no background change  */
-@@ -2316,6 +2323,9 @@
-           int back = bgcolor_of (rend); // desired background
- 
-           // only do special processing if any attributes are set, which is unlikely
-+#ifdef ENABLE_CURSORSHAPE
-+        if (!isCursorShaped)
-+#endif
-           if (ecb_unlikely (rend & (RS_baseattrMask | RS_Careful | RS_Sel)))
-             {
-               bool invert = rend & RS_RVid;
-@@ -2449,6 +2459,36 @@
-                          xpixel, ypixel + font->ascent + 1,
-                          xpixel + Width2Pixel (count) - 1, ypixel + font->ascent + 1);
-             }
-+
-+#ifdef ENABLE_CURSORSHAPE
-+          if (isCursorShaped) {
-+#ifndef NO_CURSORCOLOR
-+            if (ISSET_PIXCOLOR (Color_cursor))
-+              XSetForeground (dpy, gc, pix_colors[Color_cursor]);
-+            else
-+#endif
-+              XSetForeground (dpy, gc, pix_colors[ccol1]);
-+
-+            switch (screen.cursorShape)
-+              {
-+                case 2:
-+                  XFillRectangle (dpy, vt, gc,
-+                      Col2Pixel (col),
-+                      Row2Pixel (row),
-+                      2,
-+                      Height2Pixel (1)-font->descent+4);
-+                  break;
-+
-+                case 1:
-+                default:
-+                  XFillRectangle (dpy, vt, gc,
-+                      Col2Pixel (col),
-+                      Row2Pixel (row)+Height2Pixel(1)-font->descent,
-+                      Width2Pixel (1),
-+                      2);
-+              }
-+          }
-+#endif
-         }                     /* for (col....) */
-     }                         /* for (row....) */
- 
diff -Nru rxvt-unicode-9.20/debian/patches/14_disable_xon.diff rxvt-unicode-9.20/debian/patches/14_disable_xon.diff
--- rxvt-unicode-9.20/debian/patches/14_disable_xon.diff	2014-06-29 22:35:38.000000000 -0300
+++ rxvt-unicode-9.20/debian/patches/14_disable_xon.diff	1969-12-31 21:00:00.000000000 -0300
@@ -1,11 +0,0 @@
---- rxvt-unicode-9.20.orig/src/main.C
-+++ rxvt-unicode-9.20/src/main.C
-@@ -583,7 +583,7 @@
- # ifdef IMAXBEL
-                   | IMAXBEL
- # endif
--                  | IXON);
-+                  );
- 
-   /* output modes */
-   tio->c_oflag = (OPOST | ONLCR);
diff -Nru rxvt-unicode-9.20/debian/patches/series rxvt-unicode-9.20/debian/patches/series
--- rxvt-unicode-9.20/debian/patches/series	2014-06-29 22:35:38.000000000 -0300
+++ rxvt-unicode-9.20/debian/patches/series	2014-05-02 11:00:21.000000000 -0300
@@ -4,5 +4,3 @@
 07_rgb_location.diff
 11_fix_lexgrog.diff
 12_hyphen_minus_sign.diff
-13_ibeam_cursor.diff
-14_disable_xon.diff


More information about the Pkg-urxvt-maintainers mailing list