From 54244e93a0091d588a59b3be86d35dc4e1a2b9ae Mon Sep 17 00:00:00 2001 From: gryf Date: Mon, 30 Oct 2023 18:26:20 +0100 Subject: [PATCH] Removed old patches --- ...-9.22-add-space-to-extent_test_chars.patch | 12 - ...-unicode-9.22-disable-graphics-query.patch | 23 -- ...rxvt-unicode-9.22-enable-wide-glyphs.patch | 271 ------------------ .../rxvt-unicode-9.22-font-width-fix.patch | 26 -- .../rxvt-unicode-9.22-line-spacing-fix.patch | 26 -- ...xvt-unicode-9.22-sgr-mouse-mode-flag.patch | 165 ----------- ...rxvt-unicode-9.26-enable-wide-glyphs.patch | 271 ------------------ ...rxvt-unicode-9.30-enable-wide-glyphs.patch | 271 ------------------ 8 files changed, 1065 deletions(-) delete mode 100644 x11-terms/rxvt-unicode/files/rxvt-unicode-9.22-add-space-to-extent_test_chars.patch delete mode 100644 x11-terms/rxvt-unicode/files/rxvt-unicode-9.22-disable-graphics-query.patch delete mode 100644 x11-terms/rxvt-unicode/files/rxvt-unicode-9.22-enable-wide-glyphs.patch delete mode 100644 x11-terms/rxvt-unicode/files/rxvt-unicode-9.22-font-width-fix.patch delete mode 100644 x11-terms/rxvt-unicode/files/rxvt-unicode-9.22-line-spacing-fix.patch delete mode 100644 x11-terms/rxvt-unicode/files/rxvt-unicode-9.22-sgr-mouse-mode-flag.patch delete mode 100644 x11-terms/rxvt-unicode/files/rxvt-unicode-9.26-enable-wide-glyphs.patch delete mode 100644 x11-terms/rxvt-unicode/files/rxvt-unicode-9.30-enable-wide-glyphs.patch diff --git a/x11-terms/rxvt-unicode/files/rxvt-unicode-9.22-add-space-to-extent_test_chars.patch b/x11-terms/rxvt-unicode/files/rxvt-unicode-9.22-add-space-to-extent_test_chars.patch deleted file mode 100644 index 380b9c2..0000000 --- a/x11-terms/rxvt-unicode/files/rxvt-unicode-9.22-add-space-to-extent_test_chars.patch +++ /dev/null @@ -1,12 +0,0 @@ -diff -ur rxvt-unicode-9.22-a/src/rxvtfont.C rxvt-unicode-9.22-b/src/rxvtfont.C ---- rxvt-unicode-9.22-a/src/rxvtfont.C 2021-01-26 13:41:32.889882053 +0100 -+++ rxvt-unicode-9.22-b/src/rxvtfont.C 2021-01-26 13:43:25.909883427 +0100 -@@ -155,7 +155,7 @@ - // these characters are used to guess the font height and width - // pango uses a similar algorithm and doesn't trust the font either. - static uint16_t extent_test_chars[] = { -- '0', '1', '8', 'a', 'd', 'x', 'm', 'y', 'g', 'W', 'X', '\'', '_', -+ ' ', '0', '1', '8', 'a', 'd', 'x', 'm', 'y', 'g', 'W', 'X', '\'', '_', - 0x00cd, 0x00d5, 0x0114, 0x0177, 0x0643, // ÍÕĔŷﻙ - 0x304c, 0x672c, // が本 - }; diff --git a/x11-terms/rxvt-unicode/files/rxvt-unicode-9.22-disable-graphics-query.patch b/x11-terms/rxvt-unicode/files/rxvt-unicode-9.22-disable-graphics-query.patch deleted file mode 100644 index 53f33b2..0000000 --- a/x11-terms/rxvt-unicode/files/rxvt-unicode-9.22-disable-graphics-query.patch +++ /dev/null @@ -1,23 +0,0 @@ -diff -ur rxvt-unicode-9.22-orig/src/command.C rxvt-unicode-9.22/src/command.C ---- rxvt-unicode-9.22-orig/src/command.C 2016-01-18 20:35:08.000000000 +0100 -+++ rxvt-unicode-9.22/src/command.C 2021-05-17 21:22:29.068263084 +0200 -@@ -2722,12 +2722,13 @@ - } - break; - -- /* kidnapped escape sequence: Should be 8.3.48 */ -- case C1_ESA: /* ESC G */ -- // used by original rxvt for rob nations own graphics mode -- if (cmd_getc () == 'Q') -- tt_printf ("\033G0\012"); /* query graphics - no graphics */ -- break; -+// disabled because embedded newlines can make exploits easier -+// /* kidnapped escape sequence: Should be 8.3.48 */ -+// case C1_ESA: /* ESC G */ -+// // used by original rxvt for rob nations own graphics mode -+// if (cmd_getc () == 'Q') -+// tt_printf ("\033G0\012"); /* query graphics - no graphics */ -+// break; - - /* 8.3.63: CHARACTER TABULATION SET */ - case C1_HTS: /* ESC H */ diff --git a/x11-terms/rxvt-unicode/files/rxvt-unicode-9.22-enable-wide-glyphs.patch b/x11-terms/rxvt-unicode/files/rxvt-unicode-9.22-enable-wide-glyphs.patch deleted file mode 100644 index be366ea..0000000 --- a/x11-terms/rxvt-unicode/files/rxvt-unicode-9.22-enable-wide-glyphs.patch +++ /dev/null @@ -1,271 +0,0 @@ -diff -ur rxvt-unicode-9.22-a/config.h.in rxvt-unicode-9.22-b/config.h.in ---- rxvt-unicode-9.22-a/config.h.in 2015-06-17 13:57:42.000000000 +0200 -+++ rxvt-unicode-9.22-b/config.h.in 2021-01-26 13:41:32.889882053 +0100 -@@ -18,6 +18,9 @@ - /* Define if you want your background to use the parent window background */ - #undef ENABLE_TRANSPARENCY - -+/* Define if you want to display wide glyphs */ -+#undef ENABLE_WIDE_GLYPHS -+ - /* Define if you want european extended codesets */ - #undef ENCODING_EU - -diff -ur rxvt-unicode-9.22-a/configure rxvt-unicode-9.22-b/configure ---- rxvt-unicode-9.22-a/configure 2016-01-23 21:08:12.000000000 +0100 -+++ rxvt-unicode-9.22-b/configure 2021-01-26 13:41:32.889882053 +0100 -@@ -717,6 +717,7 @@ - enable_combining - enable_xft - enable_font_styles -+enable_wide_glyphs - enable_pixbuf - enable_startup_notification - enable_transparency -@@ -1390,6 +1391,7 @@ - --enable-combining enable composition of base and combining characters - --enable-xft enable xft support on systems that have it - --enable-font-styles enable bold and italic support -+ --enable-wide-glyphs enable displaying of wide glyphs - --enable-pixbuf enable integration with gdk-pixbuf for background images - --enable-startup-notification enable freedesktop startup notification support - --enable-transparency enable transparent backgrounds -@@ -4780,6 +4782,7 @@ - support_8bitctrls=no - support_iso14755=no - support_styles=no -+ support_wide_glyphs=no - support_perl=no - codesets= - fi -@@ -4808,6 +4811,7 @@ - #support_8bitctrls=yes - support_iso14755=yes - support_styles=yes -+ support_wide_glyphs=yes - support_perl=yes - codesets=all - fi -@@ -4909,6 +4913,14 @@ - fi - - -+# Check whether --enable-wide-glyphs was given. -+if test "${enable_wide_glyphs+set}" = set; then : -+ enableval=$enable_wide_glyphs; if test x$enableval = xyes -o x$enableval = xno; then -+ support_wide_glyphs=$enableval -+ fi -+fi -+ -+ - # Check whether --enable-pixbuf was given. - if test "${enable_pixbuf+set}" = set; then : - enableval=$enable_pixbuf; if test x$enableval = xyes -o x$enableval = xno; then -@@ -7734,6 +7746,11 @@ - $as_echo "#define ENABLE_STYLES 1" >>confdefs.h - - fi -+if test x$support_wide_glyphs = xyes; then -+ -+$as_echo "#define ENABLE_WIDE_GLYPHS 1" >>confdefs.h -+ -+fi - if test x$support_iso14755 = xyes; then - - $as_echo "#define ISO_14755 1" >>confdefs.h -diff -ur rxvt-unicode-9.22-a/configure.ac rxvt-unicode-9.22-b/configure.ac ---- rxvt-unicode-9.22-a/configure.ac 2015-06-17 13:57:42.000000000 +0200 -+++ rxvt-unicode-9.22-b/configure.ac 2021-01-26 13:41:32.889882053 +0100 -@@ -132,6 +132,7 @@ - support_8bitctrls=no - support_iso14755=no - support_styles=no -+ support_wide_glyphs=no - support_perl=no - codesets= - fi -@@ -160,6 +161,7 @@ - #support_8bitctrls=yes - support_iso14755=yes - support_styles=yes -+ support_wide_glyphs=yes - support_perl=yes - codesets=all - fi -@@ -225,6 +227,12 @@ - support_styles=$enableval - fi]) - -+AC_ARG_ENABLE(wide-glyphs, -+ [ --enable-wide-glyphs enable displaying of wide glyphs], -+ [if test x$enableval = xyes -o x$enableval = xno; then -+ support_wide_glyphs=$enableval -+ fi]) -+ - AC_ARG_ENABLE(pixbuf, - [ --enable-pixbuf enable integration with gdk-pixbuf for background images], - [if test x$enableval = xyes -o x$enableval = xno; then -@@ -648,6 +656,9 @@ - if test x$support_styles = xyes; then - AC_DEFINE(ENABLE_STYLES, 1, Define if you want bold and italic support) - fi -+if test x$support_wide_glyphs = xyes; then -+ AC_DEFINE(ENABLE_WIDE_GLYPHS, 1, Define if you want to display wide glyphs) -+fi - if test x$support_iso14755 = xyes; then - AC_DEFINE(ISO_14755, 1, Define if you want ISO 14755 extended support) - fi -diff -ur rxvt-unicode-9.22-a/src/command.C rxvt-unicode-9.22-b/src/command.C ---- rxvt-unicode-9.22-a/src/command.C 2016-01-18 20:35:08.000000000 +0100 -+++ rxvt-unicode-9.22-b/src/command.C 2021-01-26 13:41:32.889882053 +0100 -@@ -237,7 +237,9 @@ - # endif - scr_overlay_set (11, y + 1, ch, r); - -+#if !ENABLE_WIDE_GLYPHS - if (WCWIDTH (ch) >= 2) -+#endif - scr_overlay_set (12, y + 1, NOCHAR, r); - } - -diff -ur rxvt-unicode-9.22-a/src/rxvtfont.C rxvt-unicode-9.22-b/src/rxvtfont.C ---- rxvt-unicode-9.22-a/src/rxvtfont.C 2021-01-26 13:39:13.257880354 +0100 -+++ rxvt-unicode-9.22-b/src/rxvtfont.C 2021-01-26 13:41:32.889882053 +0100 -@@ -471,6 +471,7 @@ - else - switch (t) - { -+ case ' ': - case '\t': - case ZERO_WIDTH_CHAR: - case NOCHAR: -@@ -1026,8 +1027,10 @@ - - careful = xcs->lbearing < 0 || xcs->rbearing > prop->width * wcw; - -+#if !ENABLE_WIDE_GLYPHS - if (careful && !OVERLAP_OK (w, wcw, prop)) - return false; -+#endif - - return true; - } -@@ -1365,12 +1368,14 @@ - - careful = g.x > 0 || w > prop->width * wcw; - -+#if !ENABLE_WIDE_GLYPHS - if (careful && !OVERLAP_OK (w, wcw, prop)) - return false; - - // this weeds out _totally_ broken fonts, or glyphs - if (!OVERLAP_OK (g.xOff, wcw, prop)) - return false; -+#endif - - return true; - } -@@ -1415,6 +1420,10 @@ - - ep->glyph = glyph; - ep->x = x_ + (cwidth - extents.xOff >> 1); -+#if ENABLE_WIDE_GLYPHS -+ /* Left-align to bounding box, do not overlap to the left. */ -+ max_it(ep->x, x_); -+#endif - ep->y = y_ + ascent; - - if (extents.xOff == 0) -diff -ur rxvt-unicode-9.22-a/src/screen.C rxvt-unicode-9.22-b/src/screen.C ---- rxvt-unicode-9.22-a/src/screen.C 2016-01-18 20:35:08.000000000 +0100 -+++ rxvt-unicode-9.22-b/src/screen.C 2021-01-26 13:41:32.889882053 +0100 -@@ -936,7 +936,61 @@ - # endif - #endif - -- rend_t rend = SET_FONT (rstyle, FONTSET (rstyle)->find_font (c)); -+ rend_t rend; -+#if ENABLE_WIDE_GLYPHS -+ // Re-use previous font for space characters. -+ // This allows for better display of wider chars with regard to -+ // backtracking (which uses RS_SAME). -+ if (c != ' ') -+ { -+#endif -+ rend = SET_FONT (rstyle, FONTSET (rstyle)->find_font (c)); -+#if ENABLE_WIDE_GLYPHS -+ -+ } -+ else -+ { -+ // Code taken from ENABLE_COMBINING - might get refactored. -+ line_t *linep; -+ text_t *tp; -+ rend_t *rp = NULL; -+ -+ if (screen.cur.col > 0) -+ { -+ linep = line; -+ tp = line->t + screen.cur.col - 1; -+ rp = line->r + screen.cur.col - 1; -+ } -+ else if (screen.cur.row > 0 -+ && ROW(screen.cur.row - 1).is_longer ()) -+ { -+ linep = &ROW(screen.cur.row - 1); -+ tp = linep->t + ncol - 1; -+ rp = linep->r + ncol - 1; -+ } -+ -+ if (rp) -+ { -+ // XXX: this font does not show up in iso-14755 mode for the space!? -+ if (*tp == NOCHAR) -+ { -+ while (*tp == NOCHAR && tp > linep->t) -+ tp--, rp--; -+ -+ // first try to find a precomposed character -+ unicode_t n = rxvt_compose (*tp, c); -+ if (n == NOCHAR) -+ n = rxvt_composite.compose (*tp, c); -+ -+ *tp = n; -+ *rp = SET_FONT (*rp, FONTSET (*rp)->find_font (*tp)); -+ } -+ rend = SET_FONT (rstyle, GET_FONT(*rp)); -+ } -+ else -+ rend = SET_FONT (rstyle, FONTSET (rstyle)->find_font (c)); -+ } -+#endif - - // if the character doesn't fit into the remaining columns... - if (ecb_unlikely (screen.cur.col > ncol - width && ncol >= width)) -@@ -2387,7 +2441,12 @@ - text--, count++, xpixel -= fwidth; - - // force redraw after "careful" characters to avoid pixel droppings -- for (int i = 0; srp[col + i] & RS_Careful && col + i < ncol - 1; i++) -+ for (int i = 0; srp[col + i] & RS_Careful && col + i < ncol - 1 -+#if ENABLE_WIDE_GLYPHS -+ // But not for spaces. -+ && stp[col + i + 1] != ' ' -+#endif -+ ; i++) - drp[col + i + 1] = srp[col + i + 1] ^ RS_redraw; - - // force redraw before "careful" characters to avoid pixel droppings -diff -ur rxvt-unicode-9.22-a/src/xdefaults.C rxvt-unicode-9.22-b/src/xdefaults.C ---- rxvt-unicode-9.22-a/src/xdefaults.C 2016-01-23 19:38:47.000000000 +0100 -+++ rxvt-unicode-9.22-b/src/xdefaults.C 2021-01-26 13:41:32.889882053 +0100 -@@ -305,6 +305,9 @@ - #if ENABLE_STYLES - "styles," - #endif -+#if ENABLE_WIDE_GLYPHS -+ "wide-glyphs," -+#endif - #if ENABLE_COMBINING - "combining," - #endif diff --git a/x11-terms/rxvt-unicode/files/rxvt-unicode-9.22-font-width-fix.patch b/x11-terms/rxvt-unicode/files/rxvt-unicode-9.22-font-width-fix.patch deleted file mode 100644 index d7bda51..0000000 --- a/x11-terms/rxvt-unicode/files/rxvt-unicode-9.22-font-width-fix.patch +++ /dev/null @@ -1,26 +0,0 @@ -diff -ur rxvt-unicode-9.22-a/src/rxvtfont.C rxvt-unicode-9.22-b/src/rxvtfont.C ---- rxvt-unicode-9.22-a/src/rxvtfont.C 2015-09-07 16:49:33.000000000 +0200 -+++ rxvt-unicode-9.22-b/src/rxvtfont.C 2021-01-26 13:38:12.669879617 +0100 -@@ -1267,12 +1267,21 @@ - XGlyphInfo g; - XftTextExtents16 (disp, f, &ch, 1, &g); - -+/* -+ * bukind: don't use g.width as a width of a character! -+ * instead use g.xOff, see e.g.: http://keithp.com/~keithp/render/Xft.tutorial -+ - g.width -= g.x; - - int wcw = WCWIDTH (ch); - if (wcw > 0) g.width = (g.width + wcw - 1) / wcw; - - if (width < g.width ) width = g.width; -+ */ -+ int wcw = WCWIDTH (ch); -+ if (wcw > 1) g.xOff = g.xOff / wcw; -+ if (width < g.xOff) width = g.xOff; -+ - if (height < g.height ) height = g.height; - if (glheight < g.height - g.y) glheight = g.height - g.y; - } -Only in rxvt-unicode-9.22-b/src: rxvtfont.C.orig diff --git a/x11-terms/rxvt-unicode/files/rxvt-unicode-9.22-line-spacing-fix.patch b/x11-terms/rxvt-unicode/files/rxvt-unicode-9.22-line-spacing-fix.patch deleted file mode 100644 index 19588dd..0000000 --- a/x11-terms/rxvt-unicode/files/rxvt-unicode-9.22-line-spacing-fix.patch +++ /dev/null @@ -1,26 +0,0 @@ -diff -ur rxvt-unicode-9.22-a/src/rxvtfont.C rxvt-unicode-9.22-b/src/rxvtfont.C ---- rxvt-unicode-9.22-a/src/rxvtfont.C 2021-01-26 13:38:12.669879617 +0100 -+++ rxvt-unicode-9.22-b/src/rxvtfont.C 2021-01-26 13:39:13.257880354 +0100 -@@ -1239,11 +1239,22 @@ - - FT_Face face = XftLockFace (f); - -+/* -+ * use ascent, descent and height from XftFont *f instead of FT_Face face. -+ * this somehow reproduces the behaviour of the line height as seen on xterm. -+ - ascent = (face->size->metrics.ascender + 63) >> 6; - descent = (-face->size->metrics.descender + 63) >> 6; - height = max (ascent + descent, (face->size->metrics.height + 63) >> 6); - width = 0; - -+ */ -+ -+ ascent = f->ascent; -+ descent = f->descent; -+ height = max (ascent + descent, f->height); -+ width = 0; -+ - bool scalable = face->face_flags & FT_FACE_FLAG_SCALABLE; - - XftUnlockFace (f); diff --git a/x11-terms/rxvt-unicode/files/rxvt-unicode-9.22-sgr-mouse-mode-flag.patch b/x11-terms/rxvt-unicode/files/rxvt-unicode-9.22-sgr-mouse-mode-flag.patch deleted file mode 100644 index 3f6f5d9..0000000 --- a/x11-terms/rxvt-unicode/files/rxvt-unicode-9.22-sgr-mouse-mode-flag.patch +++ /dev/null @@ -1,165 +0,0 @@ -diff --git a/config.h.in b/config.h.in -index 914d606..b869bfb 100644 ---- a/config.h.in -+++ b/config.h.in -@@ -9,6 +9,9 @@ - /* Define if you want handling for rarely used but handy features */ - #undef ENABLE_FRILLS - -+/* Define if you want support for SGR mouse mode 1006 */ -+#undef ENABLE_SGRMOUSE -+ - /* Define if you can embed a perl interpreter */ - #undef ENABLE_PERL - -diff --git a/configure.ac b/configure.ac -index 0da3b59..c8b9c80 100644 ---- a/configure.ac -+++ b/configure.ac -@@ -76,6 +76,7 @@ AC_SEARCH_LIBS(gethostbyname, nsl) - AC_SEARCH_LIBS(socket, socket) - - support_frills=yes -+support_sgrmouse=yes - support_inheritpixmap=yes - support_fading=yes - support_keepscrolling=yes -@@ -109,6 +110,7 @@ AC_ARG_ENABLE(everything, - [ - if test x$enableval = xno; then - support_frills=no -+ support_sgrmouse=no - support_inheritpixmap=no - support_fading=no - support_keepscrolling=no -@@ -137,6 +139,7 @@ AC_ARG_ENABLE(everything, - fi - if test x$enableval = xyes; then - support_frills=yes -+ support_sgrmouse=yes - support_inheritpixmap=yes - support_fading=yes - support_keepscrolling=yes -@@ -359,6 +362,12 @@ AC_ARG_ENABLE(frills, - support_frills=$enableval - fi]) - -+AC_ARG_ENABLE(sgrmouse, -+ [ --enable-sgrmouse enable support for SGR mouse mode 1006], -+ [if test x$enableval = xyes -o x$enableval = xno; then -+ support_sgrmouse=$enableval -+ fi]) -+ - AC_ARG_ENABLE(keepscrolling, - [ --enable-keepscrolling enable continual scrolling on scrollbar arrow press], - [if test x$enableval = xyes -o x$enableval = xno; then -@@ -666,6 +675,9 @@ fi - if test x$support_frills = xyes; then - AC_DEFINE(ENABLE_FRILLS, 1, Define if you want handling for rarely used but handy features) - fi -+if test x$support_sgrmouse = xyes; then -+ AC_DEFINE(ENABLE_SGRMOUSE, 1, Define if you want support for SGR mouse mode 1006) -+fi - if test x$support_mousewheel = xyes; then - AC_DEFINE(MOUSE_WHEEL, 1, Define to use wheel events (button4 and button5) to scroll) - fi -diff --git a/src/command.C b/src/command.C -index 7b79f51..a62ef87 100644 ---- a/src/command.C -+++ b/src/command.C -@@ -1282,6 +1282,13 @@ rxvt_term::mouse_report (XButtonEvent &ev) - int button_number, key_state = 0; - int x, y; - int code = 32; -+ bool mode_sgr = false; -+ -+#if ENABLE_SGRMOUSE -+ if (priv_modes & PrivMode_ExtMouseSgr) mode_sgr = true; -+#endif -+ -+ if (mode_sgr) code = 0; - - x = Pixel2Col (ev.x) + 1; - y = Pixel2Row (ev.y) + 1; -@@ -1296,11 +1303,18 @@ rxvt_term::mouse_report (XButtonEvent &ev) - code += 32; - } - -- if (MEvent.button == AnyButton) -+ if (!(mode_sgr) && MEvent.button == AnyButton) - button_number = 3; - else - { -- button_number = MEvent.button - Button1; -+ if (ev.type == MotionNotify) { -+ if (ev.state & Button1Mask) button_number = 0; -+ else if (ev.state & Button2Mask) button_number = 1; -+ else if (ev.state & Button3Mask) button_number = 2; -+ else return; -+ } else { -+ button_number = ev.button - Button1; -+ } - /* add 0x3D for wheel events, like xterm does */ - if (button_number >= 3) - button_number += 64 - 3; -@@ -1361,6 +1375,15 @@ rxvt_term::mouse_report (XButtonEvent &ev) - wint_t (32 + x), - wint_t (32 + y)); - else -+#endif -+#if ENABLE_SGRMOUSE -+ if (mode_sgr) -+ tt_printf ("\033[<%d;%d;%d%c", -+ code + button_number + key_state, -+ x, -+ y, -+ (ev.type == ButtonRelease ? 'm' : 'M')); -+ else - #endif - tt_printf ("\033[M%c%c%c", - code + button_number + key_state, -@@ -2904,7 +2927,7 @@ rxvt_term::process_csi_seq () - scr_soft_reset (); - - static const int pm_h[] = { 7, 25 }; -- static const int pm_l[] = { 1, 3, 4, 5, 6, 9, 66, 1000, 1001, 1005, 1015, 1049 }; -+ static const int pm_l[] = { 1, 3, 4, 5, 6, 9, 66, 1000, 1001, 1002, 1003, 1005, 1006, 1015, 1049 }; - - process_terminal_mode ('h', 0, ecb_array_length (pm_h), pm_h); - process_terminal_mode ('l', 0, ecb_array_length (pm_l), pm_l); -@@ -3710,6 +3733,9 @@ rxvt_term::process_terminal_mode (int mode, int priv ecb_unused, unsigned int na - { 1003, PrivMode_MouseAnyEvent }, - #if ENABLE_FRILLS - { 1005, PrivMode_ExtModeMouse }, -+#endif -+#if ENABLE_SGRMOUSE -+ { 1006, PrivMode_ExtMouseSgr }, - #endif - { 1010, PrivMode_TtyOutputInh }, // rxvt extension - { 1011, PrivMode_Keypress }, // rxvt extension -diff --git a/src/rxvt.h b/src/rxvt.h -index 5c7cf66..2ffd3fb 100644 ---- a/src/rxvt.h -+++ b/src/rxvt.h -@@ -645,6 +645,7 @@ enum { - #define PrivMode_ExtModeMouse (1UL<<23) // xterm pseudo-utf-8 hack - #define PrivMode_ExtMouseRight (1UL<<24) // xterm pseudo-utf-8, but works in non-utf-8-locales - #define PrivMode_BlinkingCursor (1UL<<25) -+#define PrivMode_ExtMouseSgr (1UL<<27) // sgr mouse extension - - #define PrivMode_mouse_report (PrivMode_MouseX10|PrivMode_MouseX11|PrivMode_MouseBtnEvent|PrivMode_MouseAnyEvent) - -diff --git a/src/xdefaults.C b/src/xdefaults.C -index 894aa8d..e5952b7 100644 ---- a/src/xdefaults.C -+++ b/src/xdefaults.C -@@ -359,6 +359,9 @@ static const char optionsstring[] = "options: " - #if defined(ENABLE_FRILLS) - "frills," - #endif -+#if defined(ENABLE_SGRMOUSE) -+ "sgrmouse," -+#endif - #if defined(SELECTION_SCROLLING) - "selectionscrolling," - #endif diff --git a/x11-terms/rxvt-unicode/files/rxvt-unicode-9.26-enable-wide-glyphs.patch b/x11-terms/rxvt-unicode/files/rxvt-unicode-9.26-enable-wide-glyphs.patch deleted file mode 100644 index 31fd46d..0000000 --- a/x11-terms/rxvt-unicode/files/rxvt-unicode-9.26-enable-wide-glyphs.patch +++ /dev/null @@ -1,271 +0,0 @@ -diff -ur rxvt-unicode-9.26/config.h.in rxvt-unicode-9.26_wide/config.h.in ---- rxvt-unicode-9.26/config.h.in 2020-01-22 14:41:54.000000000 +0100 -+++ rxvt-unicode-9.26_wide/config.h.in 2021-07-13 19:50:20.006549931 +0200 -@@ -18,6 +18,9 @@ - /* Define if you want your background to use the parent window background */ - #undef ENABLE_TRANSPARENCY - -+/* Define if you want to display wide glyphs */ -+#undef ENABLE_WIDE_GLYPHS -+ - /* Define if you want european extended codesets */ - #undef ENCODING_EU - -diff -ur rxvt-unicode-9.26/configure rxvt-unicode-9.26_wide/configure ---- rxvt-unicode-9.26/configure 2021-05-14 15:50:48.000000000 +0200 -+++ rxvt-unicode-9.26_wide/configure 2021-07-13 20:12:01.802581704 +0200 -@@ -744,6 +744,7 @@ - enable_combining - enable_xft - enable_font_styles -+enable_wide_glyphs - enable_pixbuf - enable_startup_notification - enable_transparency -@@ -1425,6 +1426,7 @@ - --enable-combining enable composition of base and combining characters - --enable-xft enable xft support on systems that have it - --enable-font-styles enable bold and italic support -+ --enable-wide-glyphs enable displaying of wide glyphs - --enable-pixbuf enable integration with gdk-pixbuf for background images - --enable-startup-notification enable freedesktop startup notification support - --enable-transparency enable transparent backgrounds -@@ -5182,6 +5184,7 @@ - support_8bitctrls=no - support_iso14755=no - support_styles=no -+ support_wide_glyphs=no - support_perl=no - codesets= - fi -@@ -5210,6 +5213,7 @@ - #support_8bitctrls=yes - support_iso14755=yes - support_styles=yes -+ support_wide_glyphs=yes - support_perl=yes - codesets=all - fi -@@ -5319,6 +5323,14 @@ - fi - - -+# Check whether --enable-wide-glyphs was given. -+if test "${enable_wide_glyphs+set}" = set; then : -+ enableval=$enable_wide_glyphs; if test x$enableval = xyes -o x$enableval = xno; then -+ support_wide_glyphs=$enableval -+ fi -+fi -+ -+ - # Check whether --enable-pixbuf was given. - if test ${enable_pixbuf+y} - then : -@@ -8542,6 +8554,11 @@ - printf "%s\n" "#define ISO_14755 1" >>confdefs.h - - fi -+if test x$support_wide_glyphs = xyes; then -+ -+printf "%s\n" "#define ENABLE_WIDE_GLYPHS 1" >>confdefs.h -+ -+fi - if test x$support_8bitctrls = xyes; then - - printf "%s\n" "#define EIGHT_BIT_CONTROLS 1" >>confdefs.h -diff -ur rxvt-unicode-9.26/configure.ac rxvt-unicode-9.26_wide/configure.ac ---- rxvt-unicode-9.26/configure.ac 2021-05-13 21:40:55.000000000 +0200 -+++ rxvt-unicode-9.26_wide/configure.ac 2021-07-13 19:55:10.702557026 +0200 -@@ -134,6 +134,7 @@ - support_8bitctrls=no - support_iso14755=no - support_styles=no -+ support_wide_glyphs=no - support_perl=no - codesets= - fi -@@ -162,6 +163,7 @@ - #support_8bitctrls=yes - support_iso14755=yes - support_styles=yes -+ support_wide_glyphs=yes - support_perl=yes - codesets=all - fi -@@ -227,6 +229,12 @@ - support_styles=$enableval - fi]) - -+AC_ARG_ENABLE(wide-glyphs, -+ [ --enable-wide-glyphs enable displaying of wide glyphs], -+ [if test x$enableval = xyes -o x$enableval = xno; then -+ support_wide_glyphs=$enableval -+ fi]) -+ - AC_ARG_ENABLE(pixbuf, - [ --enable-pixbuf enable integration with gdk-pixbuf for background images], - [if test x$enableval = xyes -o x$enableval = xno; then -@@ -650,6 +658,9 @@ - if test x$support_styles = xyes; then - AC_DEFINE(ENABLE_STYLES, 1, Define if you want bold and italic support) - fi -+if test x$support_wide_glyphs = xyes; then -+ AC_DEFINE(ENABLE_WIDE_GLYPHS, 1, Define if you want to display wide glyphs) -+fi - if test x$support_iso14755 = xyes; then - AC_DEFINE(ISO_14755, 1, Define if you want ISO 14755 extended support) - fi -diff -ur rxvt-unicode-9.26/src/command.C rxvt-unicode-9.26_wide/src/command.C ---- rxvt-unicode-9.26/src/command.C 2021-05-13 21:40:55.000000000 +0200 -+++ rxvt-unicode-9.26_wide/src/command.C 2021-07-13 19:55:52.990558058 +0200 -@@ -237,7 +237,9 @@ - # endif - scr_overlay_set (11, y + 1, ch, r); - -+#if !ENABLE_WIDE_GLYPHS - if (WCWIDTH (ch) >= 2) -+#endif - scr_overlay_set (12, y + 1, NOCHAR, r); - } - -diff -ur rxvt-unicode-9.26/src/rxvtfont.C rxvt-unicode-9.26_wide/src/rxvtfont.C ---- rxvt-unicode-9.26/src/rxvtfont.C 2020-01-20 10:19:11.000000000 +0100 -+++ rxvt-unicode-9.26_wide/src/rxvtfont.C 2021-07-13 19:58:46.890562302 +0200 -@@ -471,6 +471,7 @@ - else - switch (t) - { -+ case ' ': - case '\t': - case ZERO_WIDTH_CHAR: - case NOCHAR: -@@ -1026,8 +1027,10 @@ - - careful = xcs->lbearing < 0 || xcs->rbearing > prop->width * wcw; - -+#if !ENABLE_WIDE_GLYPHS - if (careful && !OVERLAP_OK (w, wcw, prop)) - return false; -+#endif - - return true; - } -@@ -1345,12 +1348,14 @@ - - careful = g.x > 0 || w > prop->width * wcw; - -+#if !ENABLE_WIDE_GLYPHS - if (careful && !OVERLAP_OK (w, wcw, prop)) - return false; - - // this weeds out _totally_ broken fonts, or glyphs - if (!OVERLAP_OK (g.xOff, wcw, prop)) - return false; -+#endif - - return true; - } -@@ -1395,6 +1400,10 @@ - - ep->glyph = glyph; - ep->x = x_ + (cwidth - extents.xOff >> 1); -+#if ENABLE_WIDE_GLYPHS -+ /* Left-align to bounding box, do not overlap to the left. */ -+ max_it(ep->x, x_); -+#endif - ep->y = y_ + ascent; - - if (extents.xOff == 0) -diff -ur rxvt-unicode-9.26/src/screen.C rxvt-unicode-9.26_wide/src/screen.C ---- rxvt-unicode-9.26/src/screen.C 2021-05-13 21:40:55.000000000 +0200 -+++ rxvt-unicode-9.26_wide/src/screen.C 2021-07-13 20:01:29.694566276 +0200 -@@ -936,7 +936,61 @@ - # endif - #endif - -- rend_t rend = SET_FONT (rstyle, FONTSET (rstyle)->find_font (c)); -+ rend_t rend; -+#if ENABLE_WIDE_GLYPHS -+ // Re-use previous font for space characters. -+ // This allows for better display of wider chars with regard to -+ // backtracking (which uses RS_SAME). -+ if (c != ' ') -+ { -+#endif -+ rend = SET_FONT (rstyle, FONTSET (rstyle)->find_font (c)); -+#if ENABLE_WIDE_GLYPHS -+ -+ } -+ else -+ { -+ // Code taken from ENABLE_COMBINING - might get refactored. -+ line_t *linep; -+ text_t *tp; -+ rend_t *rp = NULL; -+ -+ if (screen.cur.col > 0) -+ { -+ linep = line; -+ tp = line->t + screen.cur.col - 1; -+ rp = line->r + screen.cur.col - 1; -+ } -+ else if (screen.cur.row > 0 -+ && ROW(screen.cur.row - 1).is_longer ()) -+ { -+ linep = &ROW(screen.cur.row - 1); -+ tp = linep->t + ncol - 1; -+ rp = linep->r + ncol - 1; -+ } -+ -+ if (rp) -+ { -+ // XXX: this font does not show up in iso-14755 mode for the space!? -+ if (*tp == NOCHAR) -+ { -+ while (*tp == NOCHAR && tp > linep->t) -+ tp--, rp--; -+ -+ // first try to find a precomposed character -+ unicode_t n = rxvt_compose (*tp, c); -+ if (n == NOCHAR) -+ n = rxvt_composite.compose (*tp, c); -+ -+ *tp = n; -+ *rp = SET_FONT (*rp, FONTSET (*rp)->find_font (*tp)); -+ } -+ rend = SET_FONT (rstyle, GET_FONT(*rp)); -+ } -+ else -+ rend = SET_FONT (rstyle, FONTSET (rstyle)->find_font (c)); -+ } -+#endif - - // if the character doesn't fit into the remaining columns... - if (ecb_unlikely (screen.cur.col > ncol - width && ncol >= width)) -@@ -2395,7 +2449,12 @@ - text--, count++, xpixel -= fwidth; - - // force redraw after "careful" characters to avoid pixel droppings -- for (int i = 0; srp[col + i] & RS_Careful && col + i < ncol - 1; i++) -+ for (int i = 0; srp[col + i] & RS_Careful && col + i < ncol - 1 -+#if ENABLE_WIDE_GLYPHS -+ // But not for spaces. -+ && stp[col + i + 1] != ' ' -+#endif -+ ; i++) - drp[col + i + 1] = srp[col + i + 1] ^ RS_redraw; - - // force redraw before "careful" characters to avoid pixel droppings -diff -ur rxvt-unicode-9.26/src/xdefaults.C rxvt-unicode-9.26_wide/src/xdefaults.C ---- rxvt-unicode-9.26/src/xdefaults.C 2019-09-17 22:38:30.000000000 +0200 -+++ rxvt-unicode-9.26_wide/src/xdefaults.C 2021-07-13 20:02:34.230567851 +0200 -@@ -294,6 +294,9 @@ - #if ENABLE_STYLES - "styles," - #endif -+#if ENABLE_WIDE_GLYPHS -+ "wide-glyphs," -+#endif - #if ENABLE_COMBINING - "combining," - #endif diff --git a/x11-terms/rxvt-unicode/files/rxvt-unicode-9.30-enable-wide-glyphs.patch b/x11-terms/rxvt-unicode/files/rxvt-unicode-9.30-enable-wide-glyphs.patch deleted file mode 100644 index 7bc55bb..0000000 --- a/x11-terms/rxvt-unicode/files/rxvt-unicode-9.30-enable-wide-glyphs.patch +++ /dev/null @@ -1,271 +0,0 @@ -diff -ur rxvt-unicode-9.30/config.h.in rxvt-unicode-9.30-wide-glyphs/config.h.in ---- rxvt-unicode-9.30/config.h.in 2021-07-23 22:57:20.000000000 +0200 -+++ rxvt-unicode-9.30-wide-glyphs/config.h.in 2022-01-16 16:10:47.000676909 +0100 -@@ -18,6 +18,9 @@ - /* Define if you want your background to use the parent window background */ - #undef ENABLE_TRANSPARENCY - -+/* Define if you want to display wide glyphs */ -+#undef ENABLE_WIDE_GLYPHS -+ - /* Define if you want european extended codesets */ - #undef ENCODING_EU - -diff -ur rxvt-unicode-9.30/configure rxvt-unicode-9.30-wide-glyphs/configure ---- rxvt-unicode-9.30/configure 2021-11-27 21:07:00.000000000 +0100 -+++ rxvt-unicode-9.30-wide-glyphs/configure 2022-01-16 16:14:15.100672381 +0100 -@@ -744,6 +744,7 @@ - enable_fading - enable_rxvt_scroll - enable_next_scroll -+enable_wide_glyphs - enable_xterm_scroll - enable_perl - with_codesets -@@ -1412,6 +1413,7 @@ - --enable-combining enable composition of base and combining characters - --enable-xft enable xft support on systems that have it - --enable-font-styles enable bold and italic support -+ --enable-wide-glyphs enable displaying of wide glyphs - --enable-pixbuf enable integration with gdk-pixbuf for background images - --enable-startup-notification enable freedesktop startup notification support - --enable-transparency enable transparent backgrounds -@@ -5023,6 +5025,7 @@ - support_8bitctrls=no - support_iso14755=no - support_styles=no -+ support_wide_glyphs=no - support_perl=no - codesets= - fi -@@ -5048,6 +5051,7 @@ - #support_8bitctrls=yes - support_iso14755=yes - support_styles=yes -+ support_wide_glyphs=yes - support_perl=yes - codesets=all - fi -@@ -5165,6 +5169,14 @@ - fi - - -+# Check whether --enable-wide-glyphs was given. -+if test "${enable_wide_glyphs+set}" = set; then : -+ enableval=$enable_wide_glyphs; if test x$enableval = xyes -o x$enableval = xno; then -+ support_wide_glyphs=$enableval -+ fi -+fi -+ -+ - # Check whether --enable-pixbuf was given. - if test ${enable_pixbuf+y} - then : -@@ -7675,6 +7687,11 @@ - printf "%s\n" "#define ISO_14755 1" >>confdefs.h - - fi -+if test x$support_wide_glyphs = xyes; then -+ -+printf "%s\n" "#define ENABLE_WIDE_GLYPHS 1" >>confdefs.h -+ -+fi - if test x$support_8bitctrls = xyes; then - - printf "%s\n" "#define EIGHT_BIT_CONTROLS 1" >>confdefs.h -diff -ur rxvt-unicode-9.30/configure.ac rxvt-unicode-9.30-wide-glyphs/configure.ac ---- rxvt-unicode-9.30/configure.ac 2021-11-27 21:07:00.000000000 +0100 -+++ rxvt-unicode-9.30-wide-glyphs/configure.ac 2022-01-16 16:15:41.224670506 +0100 -@@ -123,6 +123,7 @@ - support_8bitctrls=no - support_iso14755=no - support_styles=no -+ support_wide_glyphs=no - support_perl=no - codesets= - fi -@@ -148,6 +149,7 @@ - #support_8bitctrls=yes - support_iso14755=yes - support_styles=yes -+ support_wide_glyphs=yes - support_perl=yes - codesets=all - fi -@@ -221,6 +223,12 @@ - support_styles=$enableval - fi]) - -+AC_ARG_ENABLE(wide-glyphs, -+ [ --enable-wide-glyphs enable displaying of wide glyphs], -+ [if test x$enableval = xyes -o x$enableval = xno; then -+ support_wide_glyphs=$enableval -+ fi]) -+ - AC_ARG_ENABLE(pixbuf, - [ --enable-pixbuf enable integration with gdk-pixbuf for background images], - [if test x$enableval = xyes -o x$enableval = xno; then -@@ -643,6 +651,9 @@ - if test x$support_styles = xyes; then - AC_DEFINE(ENABLE_STYLES, 1, Define if you want bold and italic support) - fi -+if test x$support_wide_glyphs = xyes; then -+ AC_DEFINE(ENABLE_WIDE_GLYPHS, 1, Define if you want to display wide glyphs) -+fi - if test x$support_iso14755 = xyes; then - AC_DEFINE(ISO_14755, 1, Define if you want ISO 14755 extended support) - fi -diff -ur rxvt-unicode-9.30/src/command.C rxvt-unicode-9.30-wide-glyphs/src/command.C ---- rxvt-unicode-9.30/src/command.C 2021-11-22 00:34:29.000000000 +0100 -+++ rxvt-unicode-9.30-wide-glyphs/src/command.C 2022-01-16 16:16:34.580669345 +0100 -@@ -237,7 +237,9 @@ - # endif - scr_overlay_set (11, y + 1, ch, r); - -+#if !ENABLE_WIDE_GLYPHS - if (WCWIDTH (ch) >= 2) -+#endif - scr_overlay_set (12, y + 1, NOCHAR, r); - } - -diff -ur rxvt-unicode-9.30/src/rxvtfont.C rxvt-unicode-9.30-wide-glyphs/src/rxvtfont.C ---- rxvt-unicode-9.30/src/rxvtfont.C 2021-11-21 20:33:25.000000000 +0100 -+++ rxvt-unicode-9.30-wide-glyphs/src/rxvtfont.C 2022-01-16 16:27:54.948654540 +0100 -@@ -471,6 +471,7 @@ - else - switch (t) - { -+ case ' ': - case '\t': - case ZERO_WIDTH_CHAR: - case NOCHAR: -@@ -1038,8 +1039,10 @@ - - careful = xcs->lbearing < 0 || xcs->rbearing > prop->width * wcw; - -+#if !ENABLE_WIDE_GLYPHS - if (careful && !OVERLAP_OK (w, wcw, prop)) - return false; -+#endif - - return true; - } -@@ -1410,12 +1413,14 @@ - - careful = g.x > 0 || w > cwidth; - -+#if !ENABLE_WIDE_GLYPHS - if (careful && !OVERLAP_OK (w, wcw, prop)) - return false; - - // this weeds out _totally_ broken fonts, or glyphs - if (!OVERLAP_OK (g.xOff, wcw, prop)) - return false; -+#endif - - return true; - } -@@ -1502,6 +1507,11 @@ - // in which case we use the average between the two. - ep->x += xOff ? cwidth - xOff >> 1 : 0; - -+#if ENABLE_WIDE_GLYPHS -+ /* Left-align to bounding box, do not overlap to the left. */ -+ max_it(ep->x, x_); -+#endif -+ - // xft/freetype represent combining characters as characters with zero - // width rendered over the previous character with some fonts, while - // in other fonts, they are considered normal characters, while yet -diff -ur rxvt-unicode-9.30/src/screen.C rxvt-unicode-9.30-wide-glyphs/src/screen.C ---- rxvt-unicode-9.30/src/screen.C 2021-07-03 05:55:47.000000000 +0200 -+++ rxvt-unicode-9.30-wide-glyphs/src/screen.C 2022-01-16 16:31:19.644650086 +0100 -@@ -936,7 +936,60 @@ - # endif - #endif - -- rend_t rend = SET_FONT (rstyle, FONTSET (rstyle)->find_font (c)); -+ rend_t rend; -+#if ENABLE_WIDE_GLYPHS -+ // Re-use previous font for space characters. -+ // This allows for better display of wider chars with regard to -+ // backtracking (which uses RS_SAME). -+ if (c != ' ') -+ { -+#endif -+ rend = SET_FONT (rstyle, FONTSET (rstyle)->find_font (c)); -+#if ENABLE_WIDE_GLYPHS -+ } -+ else -+ { -+ // Code taken from ENABLE_COMBINING - might get refactored. -+ line_t *linep; -+ text_t *tp; -+ rend_t *rp = NULL; -+ -+ if (screen.cur.col > 0) -+ { -+ linep = line; -+ tp = line->t + screen.cur.col - 1; -+ rp = line->r + screen.cur.col - 1; -+ } -+ else if (screen.cur.row > 0 -+ && ROW(screen.cur.row - 1).is_longer ()) -+ { -+ linep = &ROW(screen.cur.row - 1); -+ tp = linep->t + ncol - 1; -+ rp = linep->r + ncol - 1; -+ } -+ -+ if (rp) -+ { -+ // XXX: this font does not show up in iso-14755 mode for the space!? -+ if (*tp == NOCHAR) -+ { -+ while (*tp == NOCHAR && tp > linep->t) -+ tp--, rp--; -+ -+ // first try to find a precomposed character -+ unicode_t n = rxvt_compose (*tp, c); -+ if (n == NOCHAR) -+ n = rxvt_composite.compose (*tp, c); -+ -+ *tp = n; -+ *rp = SET_FONT (*rp, FONTSET (*rp)->find_font (*tp)); -+ } -+ rend = SET_FONT (rstyle, GET_FONT(*rp)); -+ } -+ else -+ rend = SET_FONT (rstyle, FONTSET (rstyle)->find_font (c)); -+ } -+#endif - - // if the character doesn't fit into the remaining columns... - if (ecb_unlikely (screen.cur.col > ncol - width && ncol >= width)) -@@ -2395,7 +2448,12 @@ - text--, count++, xpixel -= fwidth; - - // force redraw after "careful" characters to avoid pixel droppings -- for (int i = 0; srp[col + i] & RS_Careful && col + i < ncol - 1; i++) -+ for (int i = 0; srp[col + i] & RS_Careful && col + i < ncol - 1 -+#if ENABLE_WIDE_GLYPHS -+ // But not for spaces. -+ && stp[col + i + 1] != ' ' -+#endif -+ ; i++) - drp[col + i + 1] = srp[col + i + 1] ^ RS_redraw; - - // force redraw before "careful" characters to avoid pixel droppings -diff -ur rxvt-unicode-9.30/src/xdefaults.C rxvt-unicode-9.30-wide-glyphs/src/xdefaults.C ---- rxvt-unicode-9.30/src/xdefaults.C 2021-07-03 18:36:13.000000000 +0200 -+++ rxvt-unicode-9.30-wide-glyphs/src/xdefaults.C 2022-01-16 16:31:59.204649225 +0100 -@@ -298,6 +298,9 @@ - #if ENABLE_STYLES - "styles," - #endif -+#if ENABLE_WIDE_GLYPHS -+ "wide-glyphs," -+#endif - #if ENABLE_COMBINING - "combining," - #endif