summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorSergT2021-07-12 23:03:10 +0300
committerSergT2021-07-12 23:03:10 +0300
commit793dfd300592158671adfb4929dfd558e4c21d13 (patch)
tree378becb2a27e7ff4f27a61f19cd21331419918cc
parent359c2297b12bbc2c90558be5d0ad450bc57fe51d (diff)
downloadaur-793dfd300592158671adfb4929dfd558e4c21d13.tar.gz
Update to 9.26
-rw-r--r--.SRCINFO15
-rw-r--r--24-bit-color.patch723
-rw-r--r--PKGBUILD16
3 files changed, 360 insertions, 394 deletions
diff --git a/.SRCINFO b/.SRCINFO
index 0b326eae78b6..8ded6d24dfb2 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,7 +1,7 @@
pkgbase = rxvt-unicode-truecolor
pkgdesc = Unicode enabled rxvt-clone terminal emulator (urxvt) with true color patch (24bit colors support). That enables vim 24-bit true color colorshemes
- pkgver = 9.22
- pkgrel = 7
+ pkgver = 9.26
+ pkgrel = 1
url = http://software.schmorp.de/pkg/rxvt-unicode.html
arch = x86_64
license = GPL
@@ -17,21 +17,20 @@ pkgbase = rxvt-unicode-truecolor
optdepends = gtk2-perl: to use the urxvt-tabbed
provides = rxvt-unicode
conflicts = rxvt-unicode
- source = http://dist.schmorp.de/rxvt-unicode/rxvt-unicode-9.22.tar.bz2
+ source = http://dist.schmorp.de/rxvt-unicode/rxvt-unicode-9.26.tar.bz2
source = urxvt.desktop
source = urxvtc.desktop
source = urxvt-tabbed.desktop
source = 24-bit-color.patch
- sha256sums = e94628e9bcfa0adb1115d83649f898d6edb4baced44f5d5b769c2eeb8b95addd
+ sha256sums = 643116b9a25d29ad29f4890131796d42e6d2d21312282a613ef66c80c5b8c98b
sha256sums = 5f9c435d559371216d1c5b49c6ec44bfdb786b12d925d543c286b0764dea0319
sha256sums = 91536bb27c6504d6cb0d33775a0c4709a4b439670b900f0c278c25037f19ad66
sha256sums = ccd7c436e959bdc9ab4f15801a67c695b382565b31d8c352254362e67412afcb
- sha256sums = eee0afe570124d3dc1e2b7a2e1452b981b38c8fda96e30cffc554428c2027619
- sha512sums = b39f1b2cbe6dd3fbd2a0ad6a9d391a2b6f49d7c5e67bc65fe44a9c86937f8db379572c67564c6e21ff6e09b447cdfd4e540544e486179e94da0e0db679c04dd9
+ sha256sums = 7c2ebaa3841c82a4f411568d8225b323d1efc70637d99b5b17d92a2249924137
+ sha512sums = 35560b57730e17c9542ea4a615fd86ce703c4e6421323e8fe1570007737a880fde90d17943e5af9e170be4111b9769f4aa7e57efca5428421fdc1c299112f8e0
sha512sums = 7184714a908071a4e8e5c065c5f90255e94dfd072df459c8d6f66fca3647781b3d1f6908b9303bcfd0d5b3f2e3822a8d66efaaa8a7c4d44f6e682839031a6e99
sha512sums = aa501eeeb220ba03b3f101b160230612efbca87694fef88c469b2976d29769c24b34576ea82f6c7941fad6039ac776f32e397add9b957b49bf2e84aeb67b66d6
sha512sums = 18c7afb0c3eb8c832893b9ead09d25374b70ae1cd5479a5291d11794906c53daa6f1a1bf698b37efda062bb2b991cacac53a0a6c185ca416b8718fde2bb6a7af
- sha512sums = e29107a341ae8af9702860f743ae3bda1f51f3241d44af4a9ae9262907ec2fff02ee734103e379c33b65a211629389503bea8f3d68f188c86c2bb13a8055f1b8
+ sha512sums = c88e1f3e3494be75acae75b613ac445a27e3d42a4860ae5662c91ecbeaf1b1fe2e0d0b97a2542f128a156c49228c01136632be0f659972fe13e541e21e6bf7ac
pkgname = rxvt-unicode-truecolor
-
diff --git a/24-bit-color.patch b/24-bit-color.patch
index b3b587f77bcf..d66181e9dcb0 100644
--- a/24-bit-color.patch
+++ b/24-bit-color.patch
@@ -1,43 +1,9 @@
---- README.configure
-+++ README.configure
-@@ -9,8 +9,8 @@ CONFIGURE OPTIONS
-
- --enable-everything
- Add (or remove) support for all non-multichoice options listed in
-- "./configure --help", except for "--enable-assert" and
-- "--enable-256-color".
-+ "./configure --help", except for "--enable-assert",
-+ "--enable-256-color" and "--enable-24-bit-color".
-
- You can specify this and then disable options you do not like by
- *following* this with the appropriate "--disable-..." arguments, or
-@@ -251,6 +251,20 @@ CONFIGURE OPTIONS
- dramatically when more than six fonts are in use by a terminal
- instance.
-
-+ --enable-24-bit-color (default: off)
-+ Enable use of 24-bit colors through
-+ SGR 38 ; 2 ; R ; G ; B m
-+ SGR 48 ; 2 ; R ; G ; B m
-+
-+ This switch should break termcap/terminfo compatibility to
-+ "TERM=rxvt-unicode-256color", and consequently set "TERM" to
-+ "rxvt-unicode-24bit" by default but there is no termcap/terminfo
-+ for 24-bit color support
-+
-+ It also results in higher memory usage and can slow down urxvt
-+ dramatically when more than six fonts are in use by a terminal
-+ instance.
-+
- --with-name=NAME (default: urxvt)
- Set the basename for the installed binaries, resulting in "urxvt",
- "urxvtd" etc.). Specify "--with-name=rxvt" to replace with "rxvt".
--- config.h.in
+++ config.h.in
-@@ -380,6 +380,9 @@
+@@ -395,6 +395,9 @@
/* Define if you want 256-color support */
#undef USE_256_COLORS
-
+
+/* Define if you want 24-bit color support */
+#undef USE_24_BIT_COLOR
+
@@ -46,7 +12,7 @@
# undef _ALL_SOURCE
--- configure
+++ configure
-@@ -713,6 +713,7 @@ enable_everything
+@@ -740,6 +740,7 @@
enable_assert
enable_warnings
enable_256_color
@@ -54,7 +20,7 @@
enable_unicode3
enable_combining
enable_xft
-@@ -1386,6 +1387,7 @@ Optional Features:
+@@ -1421,6 +1422,7 @@
--enable-assert enable assertions
--enable-warnings turn on g++ warnings
--enable-256-color enable 256-color support
@@ -62,13 +28,14 @@
--enable-unicode3 use 21 instead of 16 bits to represent unicode characters
--enable-combining enable composition of base and combining characters
--enable-xft enable xft support on systems that have it
-@@ -4820,6 +4822,20 @@ $as_echo "#define USE_256_COLORS 1" >>confdefs.h
-
+@@ -5283,6 +5285,21 @@
+
fi
-
+
+support_24_bit_color=no
+# Check whether --enable-24-bit-color was given.
-+if test "${enable_24_bit_color+set}" = set; then :
++if test ${enable_24_bit_color+y}
++then :
+ enableval=$enable_24_bit_color; if test x$enableval = xyes; then
+ support_24_bit_color=yes
+ fi
@@ -76,19 +43,19 @@
+
+if test x$support_24_bit_color = xyes; then
+
-+$as_echo "#define USE_24_BIT_COLOR 1" >>confdefs.h
++printf "%s\n" "#define USE_24_BIT_COLOR 1" >>confdefs.h
+
+fi
+
# Check whether --enable-unicode3 was given.
- if test "${enable_unicode3+set}" = set; then :
- enableval=$enable_unicode3; if test x$enableval = xyes -o x$enableval = xno; then
+ if test ${enable_unicode3+y}
+ then :
--- configure.ac
+++ configure.ac
-@@ -201,6 +201,16 @@ if test x$support_256_color = xyes; then
+@@ -203,6 +203,16 @@
AC_DEFINE(USE_256_COLORS, 1, Define if you want 256-color support)
fi
-
+
+support_24_bit_color=no
+AC_ARG_ENABLE(24-bit-color,
+ [ --enable-24-bit-color enable 24-bit color support],
@@ -102,44 +69,49 @@
AC_ARG_ENABLE(unicode3,
[ --enable-unicode3 use 21 instead of 16 bits to represent unicode characters],
[if test x$enableval = xyes -o x$enableval = xno; then
---- src/background.C
-+++ src/background.C
-@@ -312,7 +312,7 @@ rxvt_term::render_image (rxvt_image &image)
- img->draw (bg_img, PictOpOver, image.alpha * 1. / 0xffff);
-
- XRenderPictFormat *format = XRenderFindVisualFormat (dpy, visual);
-- img->convert_format (format, pix_colors [Color_bg])->replace (img);
-+ img->convert_format (format, lookup_color(Color_bg, pix_colors))->replace (img);
-
- delete bg_img;
- bg_img = img;
-@@ -471,7 +471,7 @@ rxvt_term::render_root_image ()
- }
-
- XRenderPictFormat *format = XRenderFindVisualFormat (dpy, visual);
-- img->convert_format (format, pix_colors [Color_bg])->replace (img);
-+ img->convert_format (format, lookup_color(Color_bg, pix_colors))->replace (img);
-
- delete bg_img;
- bg_img = img;
-@@ -520,7 +520,7 @@ rxvt_term::bg_init ()
- root_effects.set_blur (rs [Rs_blurradius]);
-
- if (ISSET_PIXCOLOR (Color_tint))
-- root_effects.set_tint (pix_colors_focused [Color_tint]);
-+ root_effects.set_tint (lookup_color(Color_tint, pix_colors_focused));
-
- if (rs [Rs_shade])
- root_effects.set_shade (rs [Rs_shade]);
+--- README.configure
++++ README.configure
+@@ -9,8 +9,8 @@
+
+ --enable-everything
+ Add (or remove) support for all non-multichoice options listed in
+- "./configure --help", except for "--enable-assert" and
+- "--enable-256-color".
++ "./configure --help", except for "--enable-assert",
++ "--enable-256-color" and "--enable-24-bit-color".
+
+ You can specify this and then disable options you do not like by
+ *following* this with the appropriate "--disable-..." arguments, or
+@@ -251,6 +251,20 @@
+
+ It also results in higher memory usage and can slow down urxvt
+ dramatically when more than six fonts are in use by a terminal
++ instance.
++
++ --enable-24-bit-color (default: off)
++ Enable use of 24-bit colors through
++ SGR 38 ; 2 ; R ; G ; B m
++ SGR 48 ; 2 ; R ; G ; B m
++
++ This switch should break termcap/terminfo compatibility to
++ "TERM=rxvt-unicode-256color", and consequently set "TERM" to
++ "rxvt-unicode-24bit" by default but there is no termcap/terminfo
++ for 24-bit color support
++
++ It also results in higher memory usage and can slow down urxvt
++ dramatically when more than six fonts are in use by a terminal
+ instance.
+
+ --with-name=NAME (default: urxvt)
--- src/command.C
+++ src/command.C
-@@ -1843,11 +1843,11 @@ rxvt_term::update_fade_color (unsigned int idx, bool first_time)
+@@ -1824,11 +1824,11 @@
if (rs[Rs_fade])
{
if (!first_time)
- pix_colors_focused [idx].free (this);
+ lookup_color(idx, pix_colors_focused).free (this);
-
+
rgba c;
- pix_colors [Color_fade].get (c);
- pix_colors_focused [idx].fade (this, atoi (rs[Rs_fade]), pix_colors_unfocused [idx], c);
@@ -148,38 +120,34 @@
}
#endif
}
-@@ -3334,7 +3334,7 @@ rxvt_term::process_color_seq (int report, int color, const char *str, char resp)
- if (str[0] == '?' && !str[1])
- {
+@@ -3411,7 +3411,7 @@
+ return;
+
rgba c;
- pix_colors_focused[color].get (c);
+ lookup_color(color, pix_colors_focused).get (c);
-
+ color -= minCOLOR;
+
#if XFT
- if (c.a != rgba::MAX_CC)
-@@ -3482,7 +3482,7 @@ rxvt_term::process_xterm_seq (int op, char *str, char resp)
- bool changed = false;
-
- if (ISSET_PIXCOLOR (Color_tint))
-- changed = root_effects.set_tint (pix_colors_focused [Color_tint]);
-+ changed = root_effects.set_tint (lookup_color(Color_tint, pix_colors_focused));
-
- if (changed)
- update_background ();
-@@ -3876,7 +3876,7 @@ rxvt_term::process_sgr_mode (unsigned int nargs, const int *arg)
+@@ -3906,7 +3906,7 @@
{
unsigned int i;
short rendset;
- int rendstyle;
+ rend_t rendstyle;
-
+
if (nargs == 0)
{
-@@ -3969,6 +3969,14 @@ rxvt_term::process_sgr_mode (unsigned int nargs, const int *arg)
- scr_color ((unsigned int) (minCOLOR + arg[i + 2]), Color_fg);
- i += 2;
- }
+@@ -4012,6 +4012,20 @@
+ break;
+
+ case 38: // set fg color, ISO 8613-6
+#if USE_24_BIT_COLOR
++ if (nargs > i + 2 && arg[i + 1] == 5)
++ {
++ scr_color ((unsigned int) (minCOLOR + arg[i + 2]), Color_fg);
++ i += 2;
++ }
+ else if (nargs > i + 4 && arg[i + 1] == 2)
+ {
+ unsigned int r = arg[i + 2], g = arg[i + 3], b = arg[i + 4];
@@ -187,64 +155,65 @@
+ i += 4;
+ }
+#endif
- break;
- case 39: /* default fg */
- scr_color (Color_fg, Color_fg);
-@@ -3990,6 +3998,14 @@ rxvt_term::process_sgr_mode (unsigned int nargs, const int *arg)
- scr_color ((unsigned int) (minCOLOR + arg[i + 2]), Color_bg);
- i += 2;
- }
++ break;
+ case 48: // set bg color, ISO 8613-6
+ {
+ unsigned int fgbg = arg[i] == 38 ? Color_fg : Color_bg;
+@@ -4024,6 +4038,14 @@
+
+ scr_color (idx, fgbg);
+ }
+#if USE_24_BIT_COLOR
-+ else if (nargs > i + 4 && arg[i + 1] == 2)
-+ {
-+ unsigned int r = arg[i + 2], g = arg[i + 3], b = arg[i + 4];
-+ scr_color_rgb (r, g, b, Color_bg);
-+ i += 4;
-+ }
++ else if (nargs > i + 4 && arg[i + 1] == 2)
++ {
++ unsigned int r = arg[i + 2], g = arg[i + 3], b = arg[i + 4];
++ scr_color_rgb (r, g, b, Color_bg);
++ i += 4;
++ }
+#endif
- break;
- case 49: /* default bg */
- scr_color (Color_bg, Color_bg);
+ else if (nargs > i + 4 && arg[i + 1] == 2)
+ {
+ unsigned int r = arg[i + 2];
--- src/init.C
+++ src/init.C
-@@ -1068,7 +1068,7 @@ rxvt_term::get_colors ()
-
+@@ -1110,7 +1110,7 @@
+
for (i = 0; i < NRS_COLORS; i++)
if (const char *name = rs[Rs_color + i])
- set_color (pix_colors [i], name);
+ set_color (lookup_color(i, pix_colors), name);
-
+
/*
* get scrollBar shadow colors
-@@ -1077,13 +1077,13 @@ rxvt_term::get_colors ()
+@@ -1119,13 +1119,13 @@
* from the fvwm window manager.
*/
#ifdef RXVT_SCROLLBAR
- pix_colors [Color_scroll].fade (this, 50, pix_colors [Color_bottomShadow]);
+ lookup_color(Color_scroll, pix_colors).fade (this, 50, lookup_color(Color_bottomShadow, pix_colors));
-
+
rgba cscroll;
- pix_colors [Color_scroll].get (cscroll);
+ lookup_color(Color_scroll, pix_colors).get (cscroll);
-
+
/* topShadowColor */
- if (!pix_colors[Color_topShadow].set (this,
+ if (!lookup_color(Color_topShadow, pix_colors).set (this,
rgba (
min ((int)rgba::MAX_CC, max (cscroll.r / 5, cscroll.r) * 7 / 5),
min ((int)rgba::MAX_CC, max (cscroll.g / 5, cscroll.g) * 7 / 5),
-@@ -1325,8 +1325,8 @@ rxvt_term::create_windows (int argc, const char *const *argv)
+@@ -1367,8 +1367,8 @@
window_calc (0, 0);
-
+
/* sub-window placement & size in rxvt_term::resize_all_windows () */
- attributes.background_pixel = pix_colors_focused [Color_border];
- attributes.border_pixel = pix_colors_focused [Color_border];
+ attributes.background_pixel = lookup_color(Color_border, pix_colors_focused);
+ attributes.border_pixel = lookup_color(Color_border, pix_colors_focused);
attributes.colormap = cmap;
-
+
top = XCreateWindow (dpy, parent,
-@@ -1412,8 +1412,8 @@ rxvt_term::create_windows (int argc, const char *const *argv)
+@@ -1465,8 +1465,8 @@
window_vt_x, window_vt_y,
vt_width, vt_height,
0,
@@ -252,23 +221,23 @@
- pix_colors_focused[Color_bg]);
+ lookup_color(Color_fg, pix_colors_focused),
+ lookup_color(Color_bg, pix_colors_focused));
-
+
attributes.bit_gravity = NorthWestGravity;
XChangeWindowAttributes (dpy, vt, CWBitGravity, &attributes);
-@@ -1430,8 +1430,8 @@ rxvt_term::create_windows (int argc, const char *const *argv)
+@@ -1483,8 +1483,8 @@
vt_ev.start (display, vt);
-
+
/* graphics context for the vt window */
- gcvalue.foreground = pix_colors[Color_fg];
- gcvalue.background = pix_colors[Color_bg];
+ gcvalue.foreground = lookup_color(Color_fg, pix_colors);
+ gcvalue.background = lookup_color(Color_bg, pix_colors);
gcvalue.graphics_exposures = 0;
-
+
gc = XCreateGC (dpy, vt,
--- src/main.C
+++ src/main.C
-@@ -254,10 +254,10 @@ rxvt_term::~rxvt_term ()
+@@ -248,10 +248,10 @@
for (int i = 0; i < TOTAL_COLORS; i++)
if (ISSET_PIXCOLOR (i))
{
@@ -280,38 +249,38 @@
+ lookup_color(i, pix_colors_unfocused).free (this);
#endif
}
-
-@@ -971,8 +971,8 @@ rxvt_term::set_window_color (int idx, const char *color)
+
+@@ -965,8 +965,8 @@
}
}
-
+
- pix_colors_focused[idx].free (this);
- set_color (pix_colors_focused[idx], color);
+ lookup_color(idx, pix_colors_focused).free (this);
+ set_color (lookup_color(idx, pix_colors_focused), color);
-
+
done:
/*TODO: handle Color_BD, scrollbar background, etc. */
-@@ -989,12 +989,12 @@ rxvt_term::recolor_cursor ()
+@@ -983,12 +983,12 @@
XColor fg, bg;
-
+
(ISSET_PIXCOLOR (Color_pointer_fg)
- ? pix_colors_focused[Color_pointer_fg]
- : pix_colors_focused[Color_fg]).get (fg);
+ ? lookup_color(Color_pointer_fg, pix_colors_focused)
+ : lookup_color(Color_fg, pix_colors_focused)).get (fg);
-
+
(ISSET_PIXCOLOR (Color_pointer_bg)
- ? pix_colors_focused[Color_pointer_bg]
- : pix_colors_focused[Color_bg]).get (bg);
+ ? lookup_color(Color_pointer_bg, pix_colors_focused)
+ : lookup_color(Color_bg, pix_colors_focused)).get (bg);
-
+
XRecolorCursor (dpy, TermWin_cursor, &fg, &bg);
}
-@@ -1013,14 +1013,14 @@ rxvt_term::get_colorfgbg ()
+@@ -1007,14 +1007,14 @@
char *env_colorfgbg;
-
+
for (i = Color_Black; i <= Color_White; i++)
- if (pix_colors[Color_fg] == pix_colors[i])
+ if (lookup_color(Color_fg, pix_colors) == lookup_color(i, pix_colors))
@@ -319,14 +288,14 @@
sprintf (fstr, "%d", i - Color_Black);
break;
}
-
+
for (i = Color_Black; i <= Color_White; i++)
- if (pix_colors[Color_bg] == pix_colors[i])
+ if (lookup_color(Color_bg, pix_colors) == lookup_color(i, pix_colors))
{
sprintf (bstr, "%d", i - Color_Black);
- #if BG_IMAGE_FROM_FILE
-@@ -1049,8 +1049,8 @@ rxvt_term::set_color (rxvt_color &color, const char *name)
+ #if HAVE_IMG
+@@ -1043,8 +1043,8 @@
void
rxvt_term::alias_color (int dst, int src)
{
@@ -335,9 +304,9 @@
+ lookup_color(dst, pix_colors).free (this);
+ lookup_color(dst, pix_colors).set (this, rs[Rs_color + dst] = rs[Rs_color + src]);
}
-
- /* -------------------------------------------------------------------- *
-@@ -1188,8 +1188,8 @@ rxvt_term::set_widthheight (unsigned int newwidth, unsigned int newheight)
+
+ #ifdef SMART_RESIZE
+@@ -1198,8 +1198,8 @@
void
rxvt_term::im_set_color (unsigned long &fg, unsigned long &bg)
{
@@ -346,11 +315,128 @@
+ fg = lookup_color(Color_fg, pix_colors);
+ bg = lookup_color(Color_bg, pix_colors);
}
-
+
void
+--- src/rxvtfont.C
++++ src/rxvtfont.C
+@@ -243,20 +243,20 @@
+
+ # ifdef HAVE_IMG
+ if (term->bg_img
+- && !term->pix_colors[color].is_opaque ()
++ && !term->lookup_color(color, term->pix_colors).is_opaque ()
+ && ((dst = XftDrawPicture (d))))
+ {
+ XClearArea (disp, d, x, y, w, h, false);
+
+- Picture solid_color_pict = XftDrawSrcPicture (d, &term->pix_colors[color].c);
++ Picture solid_color_pict = XftDrawSrcPicture (d, &term->lookup_color(color, term->pix_colors).c);
+ XRenderComposite (disp, PictOpOver, solid_color_pict, None, dst, 0, 0, 0, 0, x, y, w, h);
+ }
+ else
+ # endif
+- XftDrawRect (d, &term->pix_colors[color].c, x, y, w, h);
++ XftDrawRect (d, &term->lookup_color(color, term->pix_colors).c, x, y, w, h);
+
+ #else
+- XSetForeground (disp, gc, term->pix_colors[color]);
++ XSetForeground (disp, gc, term->lookup_color(color, term->pix_colors));
+ XFillRectangle (disp, d, gc, x, y, w, h);
+ #endif
+ }
+@@ -342,7 +342,7 @@
+
+ clear_rect (d, x, y, term->fwidth * len, term->fheight, bg);
+
+- XSetForeground (disp, gc, term->pix_colors[fg]);
++ XSetForeground (disp, gc, term->lookup_color(fg, term->pix_colors));
+
+ while (len)
+ {
+@@ -1053,7 +1053,7 @@
+ int base = ascent; // sorry, incorrect: term->fbase;
+
+ XGCValues v;
+- v.foreground = term->pix_colors[fg];
++ v.foreground = term->lookup_color(fg, term->pix_colors);
+ v.font = f->fid;
+
+ if (enc2b)
+@@ -1062,7 +1062,7 @@
+
+ if (bg == Color_bg && !slow)
+ {
+- v.background = term->pix_colors[bg];
++ v.background = term->lookup_color(bg, term->pix_colors);
+ XChangeGC (disp, gc, GCForeground | GCBackground | GCFont, &v);
+ XDrawImageString16 (disp, d, gc, x, y + base, xc, len);
+ }
+@@ -1094,7 +1094,7 @@
+
+ if (bg == Color_bg && !slow)
+ {
+- v.background = term->pix_colors[bg];
++ v.background = term->lookup_color(bg, term->pix_colors);
+ XChangeGC (disp, gc, GCForeground | GCBackground | GCFont, &v);
+ XDrawImageString (disp, d, gc, x, y + base, xc, len);
+ }
+@@ -1417,7 +1417,7 @@
+
+ if (term->bg_img
+ && (bg == Color_transparent || bg == Color_bg
+- || (bg >= 0 && !term->pix_colors[bg].is_opaque () && ((dst = XftDrawPicture (d2))))))
++ || (bg >= 0 && !term->lookup_color(bg, term->pix_colors).is_opaque () && ((dst = XftDrawPicture (d2))))))
+ {
+ int src_x = x, src_y = y;
+
+@@ -1454,7 +1454,7 @@
+
+ if (dst)
+ {
+- Picture solid_color_pict = XftDrawSrcPicture (d2, &term->pix_colors[bg].c);
++ Picture solid_color_pict = XftDrawSrcPicture (d2, &term->lookup_color(bg, term->pix_colors).c);
+
+ // dst can only be set when bg >= 0
+ XRenderComposite (disp, PictOpOver, solid_color_pict, None, dst, 0, 0, 0, 0, 0, 0, w, h);
+@@ -1462,9 +1462,9 @@
+ }
+ else
+ #endif
+- XftDrawRect (d2, &term->pix_colors[bg >= 0 ? bg : Color_bg].c, 0, 0, w, h);
++ XftDrawRect (d2, &term->lookup_color(bg >= 0 ? bg : Color_bg, term->pix_colors).c, 0, 0, w, h);
+
+- XftDrawGlyphSpec (d2, &term->pix_colors[fg].c, f, enc, ep - enc);
++ XftDrawGlyphSpec (d2, &term->lookup_color(fg, term->pix_colors).c, f, enc, ep - enc);
+ XCopyArea (disp, d2, d, gc, 0, 0, w, h, x, y);
+ }
+ else
+@@ -1473,7 +1473,7 @@
+ else
+ {
+ clear_rect (d, x, y, w, h, bg);
+- XftDrawGlyphSpec (d, &term->pix_colors[fg].c, f, enc, ep - enc);
++ XftDrawGlyphSpec (d, &term->lookup_color(fg, term->pix_colors).c, f, enc, ep - enc);
+ }
+ }
+
+--- src/rxvtfont.h
++++ src/rxvtfont.h
+@@ -72,8 +72,10 @@
+ char *fontdesc;
+
+ // must be power-of-two - 1, also has to match RS_fontMask in rxvt.h
+-#if USE_256_COLORS
+- enum { fontCount = 7 }; // 2 extra colors bits, 2 fewer fontcount bits
++#if USE_24_BIT_COLOR
++ enum { fontCount = 7 }; // 36 extra colors bits, 2 fewer fontcount bits
++#elif USE_256_COLORS
++ enum { fontCount = 7 }; // 2 extra colors bits, 2 fewer fontcount bits
+ #else
+ enum { fontCount = 31 };
+ #endif
--- src/rxvt.h
+++ src/rxvt.h
-@@ -39,7 +39,11 @@ typedef uint32_t text_t;
+@@ -39,7 +39,11 @@
#else
typedef uint16_t text_t; // saves lots of memory
#endif
@@ -361,10 +447,10 @@
+#endif
typedef int32_t tlen_t; // was int16_t, but this results in smaller code and memory use
typedef int32_t tlen_t_; // specifically for use in the line_t structure
-
-@@ -411,43 +415,52 @@ enum {
+
+@@ -342,43 +346,52 @@
#define RS_None 0
-
+
// GET_BGATTR depends on RS_fgShift > RS_bgShift
-#define RS_colorMask ((1UL << Color_Bits) - 1UL)
-#define RS_bgShift 0
@@ -376,7 +462,7 @@
+#define RS_fgShift (RS_bgShift + Color_Bits)
+#define RS_bgMask ((rend_t) (RS_colorMask << RS_bgShift))
+#define RS_fgMask ((rend_t) (RS_colorMask << RS_fgShift))
-
+
// must have space for rxvt_fontset::fontCount * 2 + 2 values
#define RS_fontShift (RS_fgShift + Color_Bits)
-#define RS_Careful (1UL << RS_fontShift) /* be careful when drawing these */
@@ -385,11 +471,11 @@
+#define RS_Careful ((rend_t) (1UL << RS_fontShift)) /* be careful when drawing these */
+#define RS_fontCount ((rend_t) rxvt_fontset::fontCount)
+#define RS_fontMask ((rend_t) ((RS_fontCount << (RS_fontShift + 1)) | RS_Careful)) // includes RS_Careful
-
+
// toggle this to force redraw, must be != RS_Careful and otherwise "pretty neutral"
-#define RS_redraw (2UL << RS_fontShift)
+#define RS_redraw ((rend_t) (2UL << RS_fontShift))
-
+
-#define RS_Sel (1UL << 22)
+#if USE_24_BIT_COLOR
+# define RS_fontCountSize 4
@@ -401,27 +487,27 @@
+
+#define RS_selShift (RS_fontShift + RS_fontCountSize)
+#define RS_Sel ((rend_t) (1UL << RS_selShift))
-
+
// 4 custom bits for extensions
#define RS_customCount 16UL
-#define RS_customShift 23
-#define RS_customMask ((RS_customCount - 1UL) << RS_customShift)
+#define RS_customShift (RS_selShift + 1)
+#define RS_customMask ((rend_t) ((RS_customCount - 1UL) << RS_customShift))
-
+
// font styles
-#define RS_Bold (1UL << RS_styleShift)
-#define RS_Italic (2UL << RS_styleShift)
+#define RS_Bold ((rend_t) (1UL << RS_styleShift))
+#define RS_Italic ((rend_t) (2UL << RS_styleShift))
-
+
-#define RS_styleCount 4
-#define RS_styleShift 27
-#define RS_styleMask (RS_Bold | RS_Italic)
+#define RS_styleCount 4
+#define RS_styleShift (RS_customShift + RS_styleCount)
+#define RS_styleMask ((rend_t) (RS_Bold | RS_Italic))
-
+
// fake styles
-#define RS_Blink (1UL << 29)
-#define RS_RVid (1UL << 30) // reverse video
@@ -429,44 +515,44 @@
+#define RS_Blink ((rend_t) (1UL << (RS_styleShift + 2)))
+#define RS_RVid ((rend_t) (1UL << (RS_styleShift + 3))) // reverse video
+#define RS_Uline ((rend_t) (1UL << (RS_styleShift + 4))) // underline
-
+
-#define RS_baseattrMask (RS_Italic | RS_Bold | RS_Blink | RS_RVid | RS_Uline)
-#define RS_attrMask (RS_baseattrMask | RS_fontMask)
+#define RS_baseattrMask ((rend_t) (RS_Italic | RS_Bold | RS_Blink | RS_RVid | RS_Uline))
+#define RS_attrMask ((rend_t) (RS_baseattrMask | RS_fontMask))
-
+
#define DEFAULT_RSTYLE (RS_None | (Color_fg << RS_fgShift) | (Color_bg << RS_bgShift))
#define OVERLAY_RSTYLE (RS_None | (Color_Black << RS_fgShift) | (Color_Yellow << RS_bgShift))
-@@ -599,7 +612,9 @@ enum colour_list {
+@@ -528,7 +541,9 @@
#endif
};
-
+
-#if USE_256_COLORS
+#if USE_24_BIT_COLOR
-+#define Color_Bits 25
++# define Color_Bits 25
+#elif USE_256_COLORS
- # define Color_Bits 9 // 0 .. maxTermCOLOR
+ # define Color_Bits 9 // 0 .. maxTermCOLOR24
#else
- # define Color_Bits 7 // 0 .. maxTermCOLOR
-@@ -729,21 +744,21 @@ typedef struct _mwmhints
+ # define Color_Bits 8 // 0 .. maxTermCOLOR24
+@@ -664,21 +679,21 @@
#define ROW(n) ROW_of (this, n)
-
+
/* how to build & extract colors and attributes */
-#define GET_BASEFG(x) (((x) & RS_fgMask) >> RS_fgShift)
-#define GET_BASEBG(x) (((x) & RS_bgMask) >> RS_bgShift)
+#define GET_BASEFG(x) ((((rend_t) (x)) & RS_fgMask) >> RS_fgShift)
+#define GET_BASEBG(x) ((((rend_t) (x)) & RS_bgMask) >> RS_bgShift)
-
+
-#define GET_FONT(x) (((x) & RS_fontMask) >> RS_fontShift)
-#define SET_FONT(x,fid) (((x) & ~RS_fontMask) | ((fid) << RS_fontShift))
+#define GET_FONT(x) ((((rend_t) (x)) & RS_fontMask) >> RS_fontShift)
+#define SET_FONT(x,fid) ((((rend_t) (x)) & ~((rend_t) RS_fontMask)) | (((rend_t) (fid)) << RS_fontShift))
-
+
-#define GET_STYLE(x) (((x) & RS_styleMask) >> RS_styleShift)
-#define SET_STYLE(x,style) (((x) & ~RS_styleMask) | ((style) << RS_styleShift))
+#define GET_STYLE(x) ((((rend_t) (x)) & RS_styleMask) >> RS_styleShift)
+#define SET_STYLE(x,style) ((((rend_t) (x)) & ~((rend_t) RS_styleMask)) | (((rend_t) (style)) << RS_styleShift))
-
+
-#define GET_ATTR(x) (((x) & RS_attrMask))
-#define SET_FGCOLOR(x,fg) (((x) & ~RS_fgMask) | ((fg) << RS_fgShift))
-#define SET_BGCOLOR(x,bg) (((x) & ~RS_bgMask) | ((bg) << RS_bgShift))
@@ -475,149 +561,32 @@
+#define SET_FGCOLOR(x,fg) ((((rend_t) (x)) & ~((rend_t) RS_fgMask)) | (((rend_t) (fg)) << RS_fgShift))
+#define SET_BGCOLOR(x,bg) ((((rend_t) (x)) & ~((rend_t) RS_bgMask)) | (((rend_t) (bg)) << RS_bgShift))
+#define SET_ATTR(x,a) ((((rend_t) (x)) & ~((rend_t) RS_attrMask)) | ((rend_t) (a)))
-
+
-#define RS_SAME(a,b) (!(((a) ^ (b)) & ~RS_Careful))
+#define RS_SAME(a,b) (!((((rend_t) (a)) ^ ((rend_t) (b))) & ~((rend_t) RS_Careful)))
-
+
#define PIXCOLOR_NAME(idx) rs[Rs_color + (idx)]
#define ISSET_PIXCOLOR(idx) (!!rs[Rs_color + (idx)])
-@@ -1503,7 +1518,12 @@ struct rxvt_term : zero_initialized, rxvt_vars, rxvt_screen
- void scr_swap_screen () NOTHROW;
+@@ -1413,7 +1428,12 @@
+ void scr_swap_screen () noexcept;
void scr_change_screen (int scrn);
- void scr_color (unsigned int color, int fgbg) NOTHROW;
-- void scr_rendition (int set, int style) NOTHROW;
+ void scr_color (unsigned int color, int fgbg) noexcept;
+- void scr_rendition (int set, int style) noexcept;
+#if USE_24_BIT_COLOR
-+ void scr_color_24 (unsigned int color, int fgbg) NOTHROW;
-+ void scr_color_rgb (unsigned int r, unsigned int g, unsigned int b, int fgbg) NOTHROW;
++ void scr_color_24 (unsigned int color, int fgbg) noexcept;
++ void scr_color_rgb (unsigned int r, unsigned int g, unsigned int b, int fgbg) noexcept;
+#endif
-+ rxvt_color &lookup_color (unsigned int color, rxvt_color *table) NOTHROW;
-+ void scr_rendition (int set, rend_t style) NOTHROW;
- void scr_add_lines (const wchar_t *str, int len, int minlines = 0) NOTHROW;
- void scr_backspace () NOTHROW;
- void scr_tab (int count, bool ht = false) NOTHROW;
---- src/rxvtfont.C
-+++ src/rxvtfont.C
-@@ -243,20 +243,20 @@ rxvt_font::clear_rect (rxvt_drawable &d, int x, int y, int w, int h, int color)
-
- # ifdef HAVE_BG_PIXMAP
- if (term->bg_img
-- && !term->pix_colors[color].is_opaque ()
-+ && !term->lookup_color(color, term->pix_colors).is_opaque ()
- && ((dst = XftDrawPicture (d))))
- {
- XClearArea (disp, d, x, y, w, h, false);
-
-- Picture solid_color_pict = XftDrawSrcPicture (d, &term->pix_colors[color].c);
-+ Picture solid_color_pict = XftDrawSrcPicture (d, &term->lookup_color(color, term->pix_colors).c);
- XRenderComposite (disp, PictOpOver, solid_color_pict, None, dst, 0, 0, 0, 0, x, y, w, h);
- }
- else
- # endif
-- XftDrawRect (d, &term->pix_colors[color].c, x, y, w, h);
-+ XftDrawRect (d, &term->lookup_color(color, term->pix_colors).c, x, y, w, h);
-
- #else
-- XSetForeground (disp, gc, term->pix_colors[color]);
-+ XSetForeground (disp, gc, term->lookup_color(color, term->pix_colors));
- XFillRectangle (disp, d, gc, x, y, w, h);
- #endif
- }
-@@ -342,7 +342,7 @@ rxvt_font_default::draw (rxvt_drawable &d, int x, int y,
-
- clear_rect (d, x, y, term->fwidth * len, term->fheight, bg);
-
-- XSetForeground (disp, gc, term->pix_colors[fg]);
-+ XSetForeground (disp, gc, term->lookup_color(fg, term->pix_colors));
-
- while (len)
- {
-@@ -1053,7 +1053,7 @@ rxvt_font_x11::draw (rxvt_drawable &d, int x, int y,
- int base = ascent; // sorry, incorrect: term->fbase;
-
- XGCValues v;
-- v.foreground = term->pix_colors[fg];
-+ v.foreground = term->lookup_color(fg, term->pix_colors);
- v.font = f->fid;
-
- if (enc2b)
-@@ -1062,7 +1062,7 @@ rxvt_font_x11::draw (rxvt_drawable &d, int x, int y,
-
- if (bg == Color_bg && !slow)
- {
-- v.background = term->pix_colors[bg];
-+ v.background = term->lookup_color(bg, term->pix_colors);
- XChangeGC (disp, gc, GCForeground | GCBackground | GCFont, &v);
- XDrawImageString16 (disp, d, gc, x, y + base, xc, len);
- }
-@@ -1094,7 +1094,7 @@ rxvt_font_x11::draw (rxvt_drawable &d, int x, int y,
-
- if (bg == Color_bg && !slow)
- {
-- v.background = term->pix_colors[bg];
-+ v.background = term->lookup_color(bg, term->pix_colors);
- XChangeGC (disp, gc, GCForeground | GCBackground | GCFont, &v);
- XDrawImageString (disp, d, gc, x, y + base, xc, len);
- }
-@@ -1417,7 +1417,7 @@ rxvt_font_xft::draw (rxvt_drawable &d, int x, int y,
-
- if (term->bg_img
- && (bg == Color_transparent || bg == Color_bg
-- || (bg >= 0 && !term->pix_colors[bg].is_opaque () && ((dst = XftDrawPicture (d2))))))
-+ || (bg >= 0 && !term->lookup_color(bg, term->pix_colors).is_opaque () && ((dst = XftDrawPicture (d2))))))
- {
- int src_x = x, src_y = y;
-
-@@ -1454,7 +1454,7 @@ rxvt_font_xft::draw (rxvt_drawable &d, int x, int y,
-
- if (dst)
- {
-- Picture solid_color_pict = XftDrawSrcPicture (d2, &term->pix_colors[bg].c);
-+ Picture solid_color_pict = XftDrawSrcPicture (d2, &term->lookup_color(bg, term->pix_colors).c);
-
- // dst can only be set when bg >= 0
- XRenderComposite (disp, PictOpOver, solid_color_pict, None, dst, 0, 0, 0, 0, 0, 0, w, h);
-@@ -1462,9 +1462,9 @@ rxvt_font_xft::draw (rxvt_drawable &d, int x, int y,
- }
- else
- #endif
-- XftDrawRect (d2, &term->pix_colors[bg >= 0 ? bg : Color_bg].c, 0, 0, w, h);
-+ XftDrawRect (d2, &term->lookup_color(bg >= 0 ? bg : Color_bg, term->pix_colors).c, 0, 0, w, h);
-
-- XftDrawGlyphSpec (d2, &term->pix_colors[fg].c, f, enc, ep - enc);
-+ XftDrawGlyphSpec (d2, &term->lookup_color(fg, term->pix_colors).c, f, enc, ep - enc);
- XCopyArea (disp, d2, d, gc, 0, 0, w, h, x, y);
- }
- else
-@@ -1473,7 +1473,7 @@ rxvt_font_xft::draw (rxvt_drawable &d, int x, int y,
- else
- {
- clear_rect (d, x, y, w, h, bg);
-- XftDrawGlyphSpec (d, &term->pix_colors[fg].c, f, enc, ep - enc);
-+ XftDrawGlyphSpec (d, &term->lookup_color(fg, term->pix_colors).c, f, enc, ep - enc);
- }
- }
-
---- src/rxvtfont.h
-+++ src/rxvtfont.h
-@@ -72,8 +72,10 @@ struct rxvt_fontset
- char *fontdesc;
-
- // must be power-of-two - 1, also has to match RS_fontMask in rxvt.h
--#if USE_256_COLORS
-- enum { fontCount = 7 }; // 4 extra colors bits, 4 fewer fontcount bits
-+#if USE_24_BIT_COLOR
-+ enum { fontCount = 7 }; // 36 extra colors bits, 4 fewer fontcount bits
-+#elif USE_256_COLORS
-+ enum { fontCount = 7 }; // 4 extra colors bits, 4 fewer fontcount bits
- #else
- enum { fontCount = 127 };
- #endif
++ rxvt_color &lookup_color (unsigned int color, rxvt_color *table) noexcept;
++ void scr_rendition (int set, rend_t style) noexcept;
+ void scr_add_lines (const wchar_t *str, int len, int minlines = 0) noexcept;
+ void scr_backspace () noexcept;
+ void scr_tab (int count, bool ht = false) noexcept;
--- src/rxvtperl.xs
+++ src/rxvtperl.xs
-@@ -789,6 +789,18 @@ MODULE = urxvt PACKAGE = urxvt
-
+@@ -795,6 +795,18 @@
+
PROTOTYPES: ENABLE
-
+
+TYPEMAP: <<END
+rend_t T_UINT
+
@@ -633,10 +602,10 @@
BOOT:
{
sv_setsv (get_sv ("urxvt::LIBDIR", 1), newSVpvn (LIBDIR, sizeof (LIBDIR) - 1));
-@@ -1069,43 +1081,44 @@ NOW ()
+@@ -1105,43 +1117,43 @@
OUTPUT:
RETVAL
-
+
-int
-GET_BASEFG (int rend)
+rend_t
@@ -645,7 +614,7 @@
RETVAL = GET_BASEFG (rend);
OUTPUT:
RETVAL
-
+
-int
-GET_BASEBG (int rend)
+rend_t
@@ -654,7 +623,7 @@
RETVAL = GET_BASEBG (rend);
OUTPUT:
RETVAL
-
+
-int
-SET_FGCOLOR (int rend, int new_color)
+rend_t
@@ -663,7 +632,7 @@
RETVAL = SET_FGCOLOR (rend, clamp (new_color, 0, TOTAL_COLORS - 1));
OUTPUT:
RETVAL
-
+
-int
-SET_BGCOLOR (int rend, int new_color)
+rend_t
@@ -672,17 +641,16 @@
RETVAL = SET_BGCOLOR (rend, clamp (new_color, 0, TOTAL_COLORS - 1));
OUTPUT:
RETVAL
-
+
-int
-GET_CUSTOM (int rend)
+rend_t
+GET_CUSTOM (rend_t rend)
CODE:
-+
RETVAL = (rend & RS_customMask) >> RS_customShift;
OUTPUT:
RETVAL
-
+
-int
-SET_CUSTOM (int rend, int new_value)
+rend_t
@@ -690,10 +658,10 @@
CODE:
{
if (!IN_RANGE_EXC (new_value, 0, RS_customCount))
-@@ -1515,8 +1528,8 @@ rxvt_term::vt_emask_add (U32 emask)
+@@ -1555,8 +1567,8 @@
THIS->vt_emask_perl |= emask;
THIS->vt_select_input ();
-
+
-U32
-rxvt_term::rstyle (U32 new_rstyle = THIS->rstyle)
+UV
@@ -701,29 +669,29 @@
CODE:
RETVAL = THIS->rstyle;
THIS->rstyle = new_rstyle;
-@@ -2003,10 +2016,10 @@ rxvt_term::cur_charset ()
+@@ -2043,10 +2055,10 @@
RETVAL
-
+
void
-rxvt_term::scr_xor_rect (int beg_row, int beg_col, int end_row, int end_col, U32 rstyle1 = RS_RVid, U32 rstyle2 = RS_RVid | RS_Uline)
+rxvt_term::scr_xor_rect (int beg_row, int beg_col, int end_row, int end_col, rend_t rstyle1 = RS_RVid, rend_t rstyle2 = RS_RVid | RS_Uline)
-
+
void
-rxvt_term::scr_xor_span (int beg_row, int beg_col, int end_row, int end_col, U32 rstyle = RS_RVid)
+rxvt_term::scr_xor_span (int beg_row, int beg_col, int end_row, int end_col, rend_t rstyle = RS_RVid)
-
+
void
rxvt_term::scr_bell ()
-@@ -2072,7 +2085,7 @@ rxvt_term::cmd_parse (SV *octets)
+@@ -2112,7 +2124,7 @@
}
-
+
SV *
-rxvt_term::overlay (int x, int y, int w, int h, int rstyle = OVERLAY_RSTYLE, int border = 2)
+rxvt_term::overlay (int x, int y, int w, int h, rend_t rstyle = OVERLAY_RSTYLE, int border = 2)
CODE:
{
overlay *o = new overlay (THIS, x, y, w, h, rstyle, border);
-@@ -2171,8 +2184,8 @@ Window
+@@ -2211,8 +2223,8 @@
XCreateSimpleWindow (rxvt_term *term, Window parent, int x, int y, unsigned int width, unsigned int height)
C_ARGS: term->dpy, (Window)parent,
x, y, width, height, 0,
@@ -731,29 +699,29 @@
- term->pix_colors_focused[Color_border]
+ term->lookup_color(Color_border, term->pix_colors_focused),
+ term->lookup_color(Color_border, term->pix_colors_focused)
-
+
#endif
-
-@@ -2299,7 +2312,7 @@ rxvt_term::set_background (rxvt_img *img, bool border = false)
+
+@@ -2346,7 +2358,7 @@
img->reify ()
->replace (img);
-
+
- img->convert_format (XRenderFindVisualFormat (THIS->dpy, THIS->visual), THIS->pix_colors [Color_bg])
+ img->convert_format (XRenderFindVisualFormat (THIS->dpy, THIS->visual), THIS->lookup_color(Color_bg, THIS->pix_colors))
->replace (img);
-
+
THIS->bg_img = img;
--- src/screen.C
+++ src/screen.C
-@@ -625,12 +625,52 @@ rxvt_term::scr_color (unsigned int color, int fgbg) NOTHROW
+@@ -626,12 +626,51 @@
rstyle = SET_BGCOLOR (rstyle, color);
}
-
+
+#if USE_24_BIT_COLOR
+static rxvt_color *scr_colors[1 << 24];
+
+void
-+rxvt_term::scr_color_24 (unsigned int color, int fgbg) NOTHROW
++rxvt_term::scr_color_24 (unsigned int color, int fgbg) noexcept
+{
+ color += TOTAL_COLORS;
+ if (fgbg == Color_fg)
@@ -763,7 +731,7 @@
+}
+
+void
-+rxvt_term::scr_color_rgb (unsigned int r, unsigned int g, unsigned int b, int fgbg) NOTHROW
++rxvt_term::scr_color_rgb (unsigned int r, unsigned int g, unsigned int b, int fgbg) noexcept
+{
+ unsigned int color = (r << 16) + (g << 8) + b;
+ scr_color_24(color, fgbg);
@@ -771,7 +739,7 @@
+#endif
+
+rxvt_color
-+&rxvt_term::lookup_color (unsigned int color, rxvt_color *table) NOTHROW
++&rxvt_term::lookup_color (unsigned int color, rxvt_color *table) noexcept
+{
+#if USE_24_BIT_COLOR
+ if (color >= TOTAL_COLORS) {
@@ -788,19 +756,18 @@
+ return table[color];
+}
+
-+
/* ------------------------------------------------------------------------- */
/*
* Change the rendition style for following text
*/
void
--rxvt_term::scr_rendition (int set, int style) NOTHROW
-+rxvt_term::scr_rendition (int set, rend_t style) NOTHROW
+-rxvt_term::scr_rendition (int set, int style) noexcept
++rxvt_term::scr_rendition (int set, rend_t style) noexcept
{
if (set)
rstyle |= style;
-@@ -1388,13 +1428,13 @@ rxvt_term::scr_erase_screen (int mode) NOTHROW
-
+@@ -1389,13 +1428,13 @@
+
if (mapped)
{
- gcvalue.foreground = pix_colors[bgcolor_of (rstyle)];
@@ -815,10 +782,10 @@
XChangeGC (dpy, gc, GCForeground, &gcvalue);
}
}
-@@ -1715,15 +1755,15 @@ rxvt_term::scr_rvideo_mode (bool on) NOTHROW
- {
- rvideo_state = on;
-
+@@ -1724,15 +1763,15 @@
+ }
+ else
+ #endif
- ::swap (pix_colors[Color_fg], pix_colors[Color_bg]);
+ ::swap (lookup_color(Color_fg, pix_colors), lookup_color(Color_bg, pix_colors));
#ifdef HAVE_IMG
@@ -826,16 +793,16 @@
#endif
- XSetWindowBackground (dpy, vt, pix_colors[Color_bg]);
+ XSetWindowBackground (dpy, vt, lookup_color(Color_bg, pix_colors));
-
+
XGCValues gcvalue;
- gcvalue.foreground = pix_colors[Color_fg];
- gcvalue.background = pix_colors[Color_bg];
+ gcvalue.foreground = lookup_color(Color_fg, pix_colors);
+ gcvalue.background = lookup_color(Color_bg, pix_colors);
XChangeGC (dpy, gc, GCBackground | GCForeground, &gcvalue);
-
+
scr_clear ();
-@@ -2426,14 +2466,14 @@ rxvt_term::scr_refresh () NOTHROW
+@@ -2430,14 +2469,14 @@
{
if (showcursor && focus && row == screen.cur.row
&& IN_RANGE_EXC (col, cur_col, cur_col + cursorwidth))
@@ -850,10 +817,10 @@
#endif
- XSetForeground (dpy, gc, pix_colors[fore]);
+ XSetForeground (dpy, gc, lookup_color(fore, pix_colors));
-
+
XDrawLine (dpy, vt, gc,
xpixel, ypixel + font->ascent + 1,
-@@ -2453,7 +2493,7 @@ rxvt_term::scr_refresh () NOTHROW
+@@ -2457,7 +2496,7 @@
scr_set_char_rend (ROW(screen.cur.row), cur_col, cur_rend);
else if (oldcursor.row >= 0)
{
@@ -862,16 +829,16 @@
if (cursor_type == 1)
XFillRectangle (dpy, vt, gc,
Col2Pixel (cur_col),
-@@ -2463,7 +2503,7 @@ rxvt_term::scr_refresh () NOTHROW
+@@ -2474,7 +2513,7 @@
}
else if (oldcursor.row >= 0)
{
- XSetForeground (dpy, gc, pix_colors[ccol1]);
+ XSetForeground (dpy, gc, lookup_color(ccol1, pix_colors));
-
+
XDrawRectangle (dpy, vt, gc,
Col2Pixel (cur_col),
-@@ -2532,15 +2572,15 @@ rxvt_term::scr_recolor (bool refresh) NOTHROW
+@@ -2543,15 +2582,15 @@
else
# endif
{
@@ -888,9 +855,9 @@
+ XSetWindowBackground (dpy, parent, lookup_color(Color_border, pix_colors));
+ XSetWindowBackground (dpy, vt, lookup_color(Color_bg, pix_colors));
}
-
+
XClearWindow (dpy, parent);
-@@ -2550,7 +2590,7 @@ rxvt_term::scr_recolor (bool refresh) NOTHROW
+@@ -2561,7 +2600,7 @@
if (transparent)
XSetWindowBackgroundPixmap (dpy, scrollBar.win, ParentRelative);
else
@@ -899,31 +866,44 @@
scrollBar.state = SB_STATE_IDLE;
scrollBar.show (0);
}
+--- src/scrollbar.C
++++ src/scrollbar.C
+@@ -72,8 +72,8 @@
+ total_width (),
+ term->szHint.height,
+ 0,
+- term->pix_colors[Color_fg],
+- term->pix_colors[color ()]);
++ term->lookup_color(Color_fg, term->pix_colors),
++ term->lookup_color(color (), term->pix_colors));
+ XDefineCursor (term->dpy, win, leftptr_cursor);
+
+ XSelectInput (term->dpy, win,
--- src/scrollbar-next.C
+++ src/scrollbar-next.C
-@@ -154,15 +154,15 @@ scrollBar_t::init_next ()
-
+@@ -154,15 +154,15 @@
+
gcvalue.graphics_exposures = False;
-
+
- gcvalue.foreground = term->pix_colors_focused[Color_Black];
+ gcvalue.foreground = term->lookup_color(Color_Black, term->pix_colors_focused);
blackGC = XCreateGC (term->dpy, win,
GCForeground | GCGraphicsExposures, &gcvalue);
-
+
- gcvalue.foreground = term->pix_colors_focused[Color_White];
+ gcvalue.foreground = term->lookup_color(Color_White, term->pix_colors_focused);
whiteGC = XCreateGC (term->dpy, win,
GCForeground | GCGraphicsExposures, &gcvalue);
-
+
- light = term->pix_colors_focused[Color_scroll];
+ light = term->lookup_color(Color_scroll, term->pix_colors_focused);
#if 0
//color used by rxvt
if (color.set (term, rgba (0xaeba, 0xaaaa, 0xaeba)))
-@@ -172,7 +172,7 @@ scrollBar_t::init_next ()
+@@ -172,7 +172,7 @@
grayGC = XCreateGC (term->dpy, win,
GCForeground | GCGraphicsExposures, &gcvalue);
-
+
- dark = term->pix_colors_focused[Color_Grey25];
+ dark = term->lookup_color(Color_Grey25, term->pix_colors_focused);
#if 0
@@ -931,21 +911,21 @@
if (color.set (term, rgba (0x51aa, 0x5555, 0x5144)))
--- src/scrollbar-plain.C
+++ src/scrollbar-plain.C
-@@ -38,7 +38,7 @@ scrollBar_t::show_plain (int update)
+@@ -38,7 +38,7 @@
XGCValues gcvalue;
-
+
init |= SB_STYLE_PLAIN;
- gcvalue.foreground = term->pix_colors_focused[Color_scroll];
+ gcvalue.foreground = term->lookup_color(Color_scroll, term->pix_colors_focused);
-
+
pscrollbarGC = XCreateGC (term->dpy, win, GCForeground, &gcvalue);
}
--- src/scrollbar-rxvt.C
+++ src/scrollbar-rxvt.C
-@@ -158,11 +158,11 @@ scrollBar_t::show_rxvt (int update)
-
+@@ -158,11 +158,11 @@
+
init |= SB_STYLE_RXVT;
-
+
- gcvalue.foreground = term->pix_colors[Color_topShadow];
+ gcvalue.foreground = term->lookup_color(Color_topShadow, term->pix_colors);
topShadowGC = XCreateGC (term->dpy, term->vt, GCForeground, &gcvalue);
@@ -959,15 +939,15 @@
else
--- src/scrollbar-xterm.C
+++ src/scrollbar-xterm.C
-@@ -49,13 +49,13 @@ scrollBar_t::show_xterm (int update)
+@@ -49,13 +49,13 @@
rxvt_fatal ("can't create bitmap\n");
-
+
gcvalue.fill_style = FillOpaqueStippled;
- gcvalue.foreground = term->pix_colors_focused[Color_scroll];
- gcvalue.background = term->pix_colors_focused[Color_bg];
+ gcvalue.foreground = term->lookup_color(Color_scroll, term->pix_colors_focused);
+ gcvalue.background = term->lookup_color(Color_bg, term->pix_colors_focused);
-
+
xscrollbarGC = XCreateGC (term->dpy, win,
GCForeground | GCBackground
| GCFillStyle | GCStipple, &gcvalue);
@@ -975,17 +955,4 @@
+ gcvalue.foreground = term->lookup_color(Color_border, term->pix_colors_focused);
ShadowGC = XCreateGC (term->dpy, win, GCForeground, &gcvalue);
}
-
---- src/scrollbar.C
-+++ src/scrollbar.C
-@@ -72,8 +72,8 @@ scrollBar_t::resize ()
- total_width (),
- term->szHint.height,
- 0,
-- term->pix_colors[Color_fg],
-- term->pix_colors[color ()]);
-+ term->lookup_color(Color_fg, term->pix_colors),
-+ term->lookup_color(color (), term->pix_colors));
- XDefineCursor (term->dpy, win, leftptr_cursor);
-
- XSelectInput (term->dpy, win, \ No newline at end of file
+
diff --git a/PKGBUILD b/PKGBUILD
index 5dfb6d490600..44de91a83414 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -5,15 +5,15 @@
# Contributor: tobias <tobias@archlinux.org>
# Contributor: dibblethewrecker dibblethewrecker.at.jiwe.dot.org
-# Patch downloaded from
+# Patch for 9.26 version obtained from https://aur.archlinux.org/rxvt-unicode-truecolor-wide-glyphs.git
+# Originally patch downloaded from
# https://gist.githubusercontent.com/dan-santana/63271adf12171e0fc0bc/raw/70c6343d1c0b3bca0aba4f587ed501e6cbd98d00/24-bit-color.patch
# but 2020-02-11 aur user writed that this repo was removed.
-# Send me letter with new location of this repo or repo with new patch.
_pkgname=rxvt-unicode
pkgname=rxvt-unicode-truecolor
-pkgver=9.22
-pkgrel=7
+pkgver=9.26
+pkgrel=1
pkgdesc='Unicode enabled rxvt-clone terminal emulator (urxvt) with true color patch (24bit colors support). That enables vim 24-bit true color colorshemes'
arch=('x86_64')
url='http://software.schmorp.de/pkg/rxvt-unicode.html'
@@ -29,16 +29,16 @@ source=(http://dist.schmorp.de/rxvt-unicode/${_pkgname}-${pkgver}.tar.bz2
urxvt-tabbed.desktop
24-bit-color.patch
)
-sha256sums=('e94628e9bcfa0adb1115d83649f898d6edb4baced44f5d5b769c2eeb8b95addd'
+sha256sums=('643116b9a25d29ad29f4890131796d42e6d2d21312282a613ef66c80c5b8c98b'
'5f9c435d559371216d1c5b49c6ec44bfdb786b12d925d543c286b0764dea0319'
'91536bb27c6504d6cb0d33775a0c4709a4b439670b900f0c278c25037f19ad66'
'ccd7c436e959bdc9ab4f15801a67c695b382565b31d8c352254362e67412afcb'
- 'eee0afe570124d3dc1e2b7a2e1452b981b38c8fda96e30cffc554428c2027619')
-sha512sums=('b39f1b2cbe6dd3fbd2a0ad6a9d391a2b6f49d7c5e67bc65fe44a9c86937f8db379572c67564c6e21ff6e09b447cdfd4e540544e486179e94da0e0db679c04dd9'
+ '7c2ebaa3841c82a4f411568d8225b323d1efc70637d99b5b17d92a2249924137')
+sha512sums=('35560b57730e17c9542ea4a615fd86ce703c4e6421323e8fe1570007737a880fde90d17943e5af9e170be4111b9769f4aa7e57efca5428421fdc1c299112f8e0'
'7184714a908071a4e8e5c065c5f90255e94dfd072df459c8d6f66fca3647781b3d1f6908b9303bcfd0d5b3f2e3822a8d66efaaa8a7c4d44f6e682839031a6e99'
'aa501eeeb220ba03b3f101b160230612efbca87694fef88c469b2976d29769c24b34576ea82f6c7941fad6039ac776f32e397add9b957b49bf2e84aeb67b66d6'
'18c7afb0c3eb8c832893b9ead09d25374b70ae1cd5479a5291d11794906c53daa6f1a1bf698b37efda062bb2b991cacac53a0a6c185ca416b8718fde2bb6a7af'
- 'e29107a341ae8af9702860f743ae3bda1f51f3241d44af4a9ae9262907ec2fff02ee734103e379c33b65a211629389503bea8f3d68f188c86c2bb13a8055f1b8')
+ 'c88e1f3e3494be75acae75b613ac445a27e3d42a4860ae5662c91ecbeaf1b1fe2e0d0b97a2542f128a156c49228c01136632be0f659972fe13e541e21e6bf7ac')
prepare() {
cd ${_pkgname}-${pkgver}