From f579cda810e80c59cc719e0feea999e88ab09907 Mon Sep 17 00:00:00 2001 From: ben Date: Wed, 27 Apr 2005 21:42:51 +0000 Subject: [PATCH] On monochrome displays, display the cursor in reverse video so that it's visible on reversed out text. This only applies to active block cursors for now. git-svn-id: svn://svn.tartarus.org/sgt/putty@5698 cda61777-01e9-0310-a592-d414129be87e --- unix/gtkwin.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/unix/gtkwin.c b/unix/gtkwin.c index 31d13319..f969b046 100644 --- a/unix/gtkwin.c +++ b/unix/gtkwin.c @@ -1895,7 +1895,7 @@ void do_text_internal(Context ctx, int x, int y, wchar_t *text, int len, nfg = ((monochrome ? ATTR_DEFFG : (attr & ATTR_FGMASK)) >> ATTR_FGSHIFT); nbg = ((monochrome ? ATTR_DEFBG : (attr & ATTR_BGMASK)) >> ATTR_BGSHIFT); - if (attr & ATTR_REVERSE) { + if (!!(attr & ATTR_REVERSE) ^ (monochrome && (attr & TATTR_ACTCURS))) { t = nfg; nfg = nbg; nbg = t; @@ -1908,7 +1908,7 @@ void do_text_internal(Context ctx, int x, int y, wchar_t *text, int len, if (nbg < 16) nbg |= 8; else if (nbg >= 256) nbg |= 1; } - if (attr & TATTR_ACTCURS) { + if ((attr & TATTR_ACTCURS) && !monochrome) { nfg = 260; nbg = 261; } -- 2.11.0