summaryrefslogtreecommitdiff
path: root/app/xterm/util.c
diff options
context:
space:
mode:
authorMatthieu Herrb <matthieu@cvs.openbsd.org>2010-10-05 19:37:24 +0000
committerMatthieu Herrb <matthieu@cvs.openbsd.org>2010-10-05 19:37:24 +0000
commit886d6f45644e0f447292393ce4d0cad38cb6dfb8 (patch)
treeab4367a18d645ee364d38f6279b450ee2e888b96 /app/xterm/util.c
parent5e35e8814fe78907f51a01996dc1907970c88d9c (diff)
Update to xterm 262.
tested by ajacoutot@, jasper@ and krw@.
Diffstat (limited to 'app/xterm/util.c')
-rw-r--r--app/xterm/util.c33
1 files changed, 22 insertions, 11 deletions
diff --git a/app/xterm/util.c b/app/xterm/util.c
index 9a118ae30..e22dfb2c7 100644
--- a/app/xterm/util.c
+++ b/app/xterm/util.c
@@ -1,4 +1,4 @@
-/* $XTermId: util.c,v 1.538 2010/06/15 08:17:36 tom Exp $ */
+/* $XTermId: util.c,v 1.539 2010/08/29 22:49:16 tom Exp $ */
/*
* Copyright 1999-2009,2010 by Thomas E. Dickey
@@ -1816,9 +1816,12 @@ ChangeColors(XtermWidget xw, ScrnColors * pNew)
/* no repaint needed */
} else if ((T_COLOR(screen, TEXT_CURSOR) == T_COLOR(screen, TEXT_FG)) &&
(COLOR_DEFINED(pNew, TEXT_FG))) {
- T_COLOR(screen, TEXT_CURSOR) = COLOR_VALUE(pNew, TEXT_FG);
- TRACE(("... TEXT_CURSOR: %#lx\n", T_COLOR(screen, TEXT_CURSOR)));
- repaint = screen->Vshow;
+ if (T_COLOR(screen, TEXT_CURSOR) != COLOR_VALUE(pNew, TEXT_FG)) {
+ T_COLOR(screen, TEXT_CURSOR) = COLOR_VALUE(pNew, TEXT_FG);
+ TRACE(("... TEXT_CURSOR: %#lx\n", T_COLOR(screen, TEXT_CURSOR)));
+ if (screen->Vshow)
+ repaint = True;
+ }
}
if (COLOR_DEFINED(pNew, TEXT_FG)) {
@@ -1849,14 +1852,20 @@ ChangeColors(XtermWidget xw, ScrnColors * pNew)
}
#if OPT_HIGHLIGHT_COLOR
if (COLOR_DEFINED(pNew, HIGHLIGHT_BG)) {
- T_COLOR(screen, HIGHLIGHT_BG) = COLOR_VALUE(pNew, HIGHLIGHT_BG);
- TRACE(("... HIGHLIGHT_BG: %#lx\n", T_COLOR(screen, HIGHLIGHT_BG)));
- repaint = screen->Vshow;
+ if (T_COLOR(screen, HIGHLIGHT_BG) != COLOR_VALUE(pNew, HIGHLIGHT_BG)) {
+ T_COLOR(screen, HIGHLIGHT_BG) = COLOR_VALUE(pNew, HIGHLIGHT_BG);
+ TRACE(("... HIGHLIGHT_BG: %#lx\n", T_COLOR(screen, HIGHLIGHT_BG)));
+ if (screen->Vshow)
+ repaint = True;
+ }
}
if (COLOR_DEFINED(pNew, HIGHLIGHT_FG)) {
- T_COLOR(screen, HIGHLIGHT_FG) = COLOR_VALUE(pNew, HIGHLIGHT_FG);
- TRACE(("... HIGHLIGHT_FG: %#lx\n", T_COLOR(screen, HIGHLIGHT_FG)));
- repaint = screen->Vshow;
+ if (T_COLOR(screen, HIGHLIGHT_FG) != COLOR_VALUE(pNew, HIGHLIGHT_FG)) {
+ T_COLOR(screen, HIGHLIGHT_FG) = COLOR_VALUE(pNew, HIGHLIGHT_FG);
+ TRACE(("... HIGHLIGHT_FG: %#lx\n", T_COLOR(screen, HIGHLIGHT_FG)));
+ if (screen->Vshow)
+ repaint = True;
+ }
}
#endif
@@ -1897,7 +1906,9 @@ ChangeColors(XtermWidget xw, ScrnColors * pNew)
if (COLOR_DEFINED(pNew, TEXT_FG) ||
COLOR_DEFINED(pNew, TEXT_BG) ||
COLOR_DEFINED(pNew, TEXT_CURSOR)) {
- set_cursor_gcs(xw);
+ if (set_cursor_gcs(xw) && screen->Vshow) {
+ repaint = True;
+ }
}
#if OPT_TEK4014
if (COLOR_DEFINED(pNew, TEK_FG) ||