[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#263877: Various display artifacts in uxterm



On Wed, Sep 01, 2004 at 10:45:07AM -0700, Matt Zimmerman wrote:
> On Wed, Sep 01, 2004 at 01:23:31PM -0400, Thomas Dickey wrote:
> 
> > However - the report for 263877 sounds mostly like the bug fixed in patch
> > #194 (from the mention of whitespace):
> > 
> > 	Patch #194 - 2004/7/27 - XFree86 4.4.99.11
> > 	fix a repainting bug introduced in patch #180:  when using a font
> > 	lacking line-drawing characters, a repaint of the screen could skip
> > 	horizontally an extra amount after filling in the missing character
> > 	(reports by Nicolas George, Hans de Goede, Redhat Bugzilla #128341).
> 
> Yes, this sounds like precisely the bug.

I'm only about 90% certain (seeing a screenshot would help).  If Brandon
wants to add the fix, it was rather small (attached).

-- 
Thomas E. Dickey
http://invisible-island.net
ftp://invisible-island.net
# revision 1.191
#	date: 2004/07/26 01:01:18;  author: tom;  state: Exp;  lines: +15 -4
#	fix a case in drawXtermText() broken in the patch #180 changes.  The
#	case happens when running wide-xterm in a non-UTF-8 locale but using
#	the iso-10646 fonts.  That makes line-drawing characters missing.
#	Repaint (exposure e.g., when xterm was hidden by another window, then popped)
#	shows the bug (not normally when first painting the screen since the writes
#	are broken up).  An application such as dialog makes vertical lines next
#	to regular text.  The code emitted the fixed-up vertical line but fell
#	through with the x-value updated to paint the rest of the segment in
#	another portion of drawXtermText().  However, at the end of drawXtermText(),
#	the x-value is again updated - resulting in a skip equal to the length of
#	the segment that was drawn before the special case.
#	first reported by Nicolas George in 2004/3/4, as well as Hans de Goede
#	in Redhat Bugzilla #128341 2004/7/21.
#	
#	probably this one too:
#	
#	040605
#		pasting from dialog's menubox into #190a4 running ncurses ins_wide,
#		I see some display artifacts (text that "works" when I re-expose the
#		xterm window).  It doesn't seem to be recent.  otoh, #190 displays
#		worse.
===================================================================
RCS file: RCS/util.c,v
retrieving revision 1.190
retrieving revision 1.191
diff -u -r1.190 -r1.191
--- util.c	2004/07/20 01:14:41	1.190
+++ util.c	2004/07/26 01:01:18	1.191
@@ -1,4 +1,4 @@
-/* $XTermId: util.c,v 1.190 2004/07/20 01:14:41 tom Exp $ */
+/* $XTermId: util.c,v 1.191 2004/07/26 01:01:18 tom Exp $ */
 
 /*
  *	$Xorg: util.c,v 1.3 2000/08/17 19:55:10 cpqbld Exp $
@@ -1826,7 +1826,7 @@
 		x += len * FontWidth(screen);
 	    }
 
-	    TRACE(("drewtext [%4d,%4d]\n", y, x));
+	    TRACE(("drawtext [%4d,%4d]\n", y, x));
 	} else {		/* simulate double-sized characters */
 #if OPT_WIDE_CHARS
 	    Char *wide = 0;
@@ -1941,15 +1941,26 @@
 		first = last + 1;
 	    }
 	}
-	if (last <= first)
+	if (last <= first) {
 	    return x + real_length * FontWidth(screen);
+	}
 	text += first;
 #if OPT_WIDE_CHARS
 	text2 += first;
 #endif
 	len = last - first;
 	flags |= NOTRANSLATION;
-	x = DrawX(first);
+	if (DrawX(first) != (Cardinal) x) {
+	    return drawXtermText(screen,
+				 flags,
+				 gc,
+				 DrawX(first),
+				 y,
+				 chrset,
+				 PAIRED_CHARS(text, text2),
+				 len,
+				 on_wide);
+	}
     }
 #endif /* OPT_BOX_CHARS */
     /*

Attachment: pgpwtfmTkoyh3.pgp
Description: PGP signature


Reply to: