Package: roxterm-gtk2
Version: 2.7.2-1.1
Severity: normal
File: /usr/bin/roxterm
Tags: upstream patch

The VTE block cursor can hide an underlying character when the cursor
color is explicitly set to a color which closely matches the
foreground color. VTE has a magic 'reverse video' mode for the cursor
when the cursor color is set to NULL.

This patch detects when the cursor color is set to one matching the
foreground color and sets the cursor color to NULL in this case.

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

Kernel: Linux 3.9.3 (SMP w/4 CPU cores)
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash

Versions of packages roxterm-gtk2 depends on:
ii  libc6               2.17-7
ii  libdbus-1-3         1.6.12-1
ii  libdbus-glib-1-2    0.100.2-1
ii  libgdk-pixbuf2.0-0  2.28.2-1
ii  libglib2.0-0        2.36.3-3
ii  libgtk2.0-0         2.24.20-1
ii  libice6             2:1.0.8-2
ii  libpango-1.0-0      1.32.5-5+b1
ii  librsvg2-common     2.36.4-2
ii  libsm6              2:1.2.1-2
ii  libvte9             1:0.28.2-5
ii  libx11-6            2:1.6.0-1
ii  roxterm-common      2.7.2-1.1

roxterm-gtk2 recommends no packages.

roxterm-gtk2 suggests no packages.

-- no debconf information

>From 9a9d9bf2a9bf64767dc7d542a580b6ac190a7469 Mon Sep 17 00:00:00 2001
From: Keith Packard <kei...@keithp.com>
Date: Sat, 10 Aug 2013 21:31:00 +0200
Subject: [PATCH] When cursor colour matches fg colour, set cursor to NULL

VTE has magic semantics for a NULL cursor colour, causing it to flip
the text colour for characters under the cursor so you can read them
that way.

Signed-off-by: Keith Packard <kei...@keithp.com>
---
 src/roxterm.c | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

diff --git a/src/roxterm.c b/src/roxterm.c
index 29eee80..60481d7 100644
--- a/src/roxterm.c
+++ b/src/roxterm.c
@@ -1245,8 +1245,12 @@ static void roxterm_update_background(ROXTermData * 
roxterm, VteTerminal * vte)
 static void
 roxterm_update_cursor_colour(ROXTermData * roxterm, VteTerminal * vte)
 {
-    COLOUR_SET_VTE(_cursor)(vte,
-            colour_scheme_get_cursor_colour(roxterm->colour_scheme, TRUE));
+    COLOUR_T   *cursor_colour = 
colour_scheme_get_cursor_colour(roxterm->colour_scheme, TRUE);
+    COLOUR_T   *fg_colour = 
colour_scheme_get_foreground_colour(roxterm->colour_scheme, TRUE);
+
+    if (cursor_colour && fg_colour && COLOUR_EQUAL(cursor_colour, fg_colour))
+       cursor_colour = NULL;
+    COLOUR_SET_VTE(_cursor)(vte, cursor_colour);
 }
 
 static void
-- 
1.8.3.2


-- 
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org

Reply via email to