summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorDan Elkouby2019-01-11 10:58:14 +0200
committerDan Elkouby2019-01-11 10:58:14 +0200
commiteec2249b4e62f06faa13c29e9239083eff852af6 (patch)
tree19d4a6c9efbd7311bc07374180a972cef7994474
parenta170089f40b82e4d601a5f5bbd0473b264706260 (diff)
downloadaur-eec2249b4e62f06faa13c29e9239083eff852af6.tar.gz
Include all patches in the repo
-rw-r--r--.SRCINFO6
-rw-r--r--.gitignore1
-rw-r--r--PKGBUILD6
-rw-r--r--enable-wide-glyphs.patch278
-rw-r--r--sgr-mouse-mode.patch90
5 files changed, 374 insertions, 7 deletions
diff --git a/.SRCINFO b/.SRCINFO
index 257bd50d8bf4..13540b08f407 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -19,9 +19,9 @@ pkgbase = rxvt-unicode-intensityfix
source = background-img-use-color.patch
source = font-width-fix.patch
source = line-spacing-fix.patch
- source = https://gist.githubusercontent.com/alexoj/df5bae7a4825cb596581/raw/75a1e75c2ae1ec5c0db68a29f8a6821e9e3d87a5/sgr-mouse-mode.patch
+ source = sgr-mouse-mode.patch
source = 256color.patch
- source = https://raw.githubusercontent.com/blueyed/PKGBUILD-rxvt-unicode-wide/master/enable-wide-glyphs.patch
+ source = enable-wide-glyphs.patch
md5sums = 93782dec27494eb079467dacf6e48185
md5sums = 9e2ccfa07aafa6aeaf1dbdd005437af7
md5sums = d8377a6ec47a7913636fbc368aded94b
@@ -29,7 +29,7 @@ pkgbase = rxvt-unicode-intensityfix
md5sums = 9f3248bc397ee76b008375f2ab0f201a
md5sums = f8325b0a33999db4d5d1eeac4f320156
md5sums = fb78c2ecf87626962734320cc2bb7ab1
- md5sums = 68fa093594f76e7337438f91c0ef1012
+ md5sums = fa7e51d6a521605ff1b18470510156b0
pkgname = rxvt-unicode-intensityfix
diff --git a/.gitignore b/.gitignore
index afcf6e33e91e..3265816c5b6a 100644
--- a/.gitignore
+++ b/.gitignore
@@ -2,5 +2,4 @@
/pkg/
rxvt-unicode-*.bz2
*.pkg.tar*
-sgr-mouse-mode.patch
diff --git a/PKGBUILD b/PKGBUILD
index a93138a8863c..b871f7004de1 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -17,9 +17,9 @@ source=(
'background-img-use-color.patch'
'font-width-fix.patch'
'line-spacing-fix.patch'
- 'https://gist.githubusercontent.com/alexoj/df5bae7a4825cb596581/raw/75a1e75c2ae1ec5c0db68a29f8a6821e9e3d87a5/sgr-mouse-mode.patch'
+ 'sgr-mouse-mode.patch'
'256color.patch'
- 'https://raw.githubusercontent.com/blueyed/PKGBUILD-rxvt-unicode-wide/master/enable-wide-glyphs.patch'
+ 'enable-wide-glyphs.patch'
)
md5sums=('93782dec27494eb079467dacf6e48185'
'9e2ccfa07aafa6aeaf1dbdd005437af7'
@@ -28,7 +28,7 @@ md5sums=('93782dec27494eb079467dacf6e48185'
'9f3248bc397ee76b008375f2ab0f201a'
'f8325b0a33999db4d5d1eeac4f320156'
'fb78c2ecf87626962734320cc2bb7ab1'
- '68fa093594f76e7337438f91c0ef1012')
+ 'fa7e51d6a521605ff1b18470510156b0')
prepare() {
cd $_pkgname-$pkgver
diff --git a/enable-wide-glyphs.patch b/enable-wide-glyphs.patch
new file mode 100644
index 000000000000..fb639a81b8e4
--- /dev/null
+++ b/enable-wide-glyphs.patch
@@ -0,0 +1,278 @@
+diff --git a/config.h.in b/config.h.in
+index 914d6062..2e2e03f3 100644
+--- a/config.h.in
++++ b/config.h.in
+@@ -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 --git a/configure b/configure
+index 3e3f78bd..b8b1591d 100755
+--- a/configure
++++ b/configure
+@@ -717,6 +717,7 @@ enable_unicode3
+ enable_combining
+ enable_xft
+ enable_font_styles
++enable_wide_glyphs
+ enable_pixbuf
+ enable_startup_notification
+ enable_transparency
+@@ -1390,6 +1391,7 @@ Optional Features:
+ --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 @@ if test "${enable_everything+set}" = set; then :
+ support_8bitctrls=no
+ support_iso14755=no
+ support_styles=no
++ support_wide_glyphs=no
+ support_perl=no
+ codesets=
+ fi
+@@ -4808,6 +4811,7 @@ if test "${enable_everything+set}" = set; then :
+ #support_8bitctrls=yes
+ support_iso14755=yes
+ support_styles=yes
++ support_wide_glyphs=yes
+ support_perl=yes
+ codesets=all
+ fi
+@@ -4909,6 +4913,14 @@ if test "${enable_font_styles+set}" = set; then :
+ 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
+@@ -7733,6 +7745,11 @@ if test x$support_styles = xyes; then
+
+ $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
+
+diff --git a/configure.ac b/configure.ac
+index 0da3b596..52ab8e4c 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -132,6 +132,7 @@ AC_ARG_ENABLE(everything,
+ support_8bitctrls=no
+ support_iso14755=no
+ support_styles=no
++ support_wide_glyphs=no
+ support_perl=no
+ codesets=
+ fi
+@@ -160,6 +161,7 @@ AC_ARG_ENABLE(everything,
+ #support_8bitctrls=yes
+ support_iso14755=yes
+ support_styles=yes
++ support_wide_glyphs=yes
+ support_perl=yes
+ codesets=all
+ fi
+@@ -225,6 +227,12 @@ AC_ARG_ENABLE(font-styles,
+ 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 @@ fi
+ 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 --git a/src/command.C b/src/command.C
+index 19e4fccf..75853d75 100644
+--- a/src/command.C
++++ b/src/command.C
+@@ -237,7 +237,9 @@ rxvt_term::iso14755_51 (unicode_t ch, rend_t r, int x, int y, int y2)
+ # 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 --git a/src/rxvtfont.C b/src/rxvtfont.C
+index c56921c8..9d75541a 100644
+--- a/src/rxvtfont.C
++++ b/src/rxvtfont.C
+@@ -471,6 +471,7 @@ rxvt_font_default::draw (rxvt_drawable &d, int x, int y,
+ else
+ switch (t)
+ {
++ case ' ':
+ case '\t':
+ case ZERO_WIDTH_CHAR:
+ case NOCHAR:
+@@ -1026,8 +1027,10 @@ rxvt_font_x11::has_char (unicode_t unicode, const rxvt_fontprop *prop, bool &car
+
+ 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 @@ rxvt_font_xft::has_char (unicode_t unicode, const rxvt_fontprop *prop, bool &car
+
+ 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 @@ rxvt_font_xft::draw (rxvt_drawable &d, int x, int y,
+
+ 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 --git a/src/screen.C b/src/screen.C
+index 115afbf2..61681b84 100644
+--- a/src/screen.C
++++ b/src/screen.C
+@@ -936,7 +936,61 @@ rxvt_term::scr_add_lines (const wchar_t *str, int len, int minlines) NOTHROW
+ # 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 @@ rxvt_term::scr_refresh () NOTHROW
+ 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 --git a/src/xdefaults.C b/src/xdefaults.C
+index 9b47bf2c..add21eec 100644
+--- a/src/xdefaults.C
++++ b/src/xdefaults.C
+@@ -294,6 +294,9 @@ static const char optionsstring[] = "options: "
+ #if ENABLE_STYLES
+ "styles,"
+ #endif
++#if ENABLE_WIDE_GLYPHS
++ "wide-glyphs,"
++#endif
+ #if ENABLE_COMBINING
+ "combining,"
+ #endif
diff --git a/sgr-mouse-mode.patch b/sgr-mouse-mode.patch
new file mode 100644
index 000000000000..186e8fdb74f8
--- /dev/null
+++ b/sgr-mouse-mode.patch
@@ -0,0 +1,90 @@
+--- src/command.C 2014-12-13 13:22:09.000000000 +0100
++++ src/command.C 2016-01-13 04:50:39.161862513 +0100
+@@ -1280,6 +1280,8 @@
+ int x, y;
+ int code = 32;
+
++ if (priv_modes & PrivMode_ExtMouseSgr) code = 0;
++
+ x = Pixel2Col (ev.x) + 1;
+ y = Pixel2Row (ev.y) + 1;
+
+@@ -1293,11 +1295,18 @@
+ code += 32;
+ }
+
+- if (MEvent.button == AnyButton)
++ if (!(priv_modes & PrivMode_ExtMouseSgr) && 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;
+@@ -1347,16 +1356,22 @@
+ #endif
+
+ #if ENABLE_FRILLS
++ if (priv_modes & PrivMode_ExtMouseSgr)
++ tt_printf ("\033[<%d;%d;%d%c",
++ code + button_number + key_state,
++ x,
++ y,
++ (ev.type == ButtonRelease ? 'm' : 'M'));
+- if (priv_modes & PrivMode_ExtMouseRight)
++ else if (priv_modes & PrivMode_ExtMouseRight)
+ tt_printf ("\033[%d;%d;%dM",
+ code + button_number + key_state,
+ x,
+ y);
+ else if (priv_modes & PrivMode_ExtModeMouse)
+ tt_printf ("\033[M%c%lc%lc",
+ code + button_number + key_state,
+ wint_t (32 + x),
+ wint_t (32 + y));
+ else
+ #endif
+ tt_printf ("\033[M%c%c%c",
+@@ -2908,7 +2913,7 @@
+ 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);
+@@ -3713,13 +3718,14 @@
+ { 1002, PrivMode_MouseBtnEvent },
+ { 1003, PrivMode_MouseAnyEvent },
+ #if ENABLE_FRILLS
+ { 1005, PrivMode_ExtModeMouse },
++ { 1006, PrivMode_ExtMouseSgr },
+ #endif
+ { 1010, PrivMode_TtyOutputInh }, // rxvt extension
+ { 1011, PrivMode_Keypress }, // rxvt extension
+ #if ENABLE_FRILLS
+ { 1015, PrivMode_ExtMouseRight }, // urxvt extension of 1005
+ #endif
+ // 1035 enable modifiers for alt, numlock NYI
+ // 1036 send ESC for meta keys NYI
+ // 1037 send DEL for keypad delete NYI
+--- src/rxvt.h 2014-12-17 16:33:08.000000000 +0100
++++ src/rxvt.h 2016-01-13 03:42:31.508911380 +0100
+@@ -644,6 +644,7 @@
+ #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<<26) // sgr mouse extension
+
+ #define PrivMode_mouse_report (PrivMode_MouseX10|PrivMode_MouseX11|PrivMode_MouseBtnEvent|PrivMode_MouseAnyEvent)
+