GNU bug report logs - #8470
ns_dumpglyphs_stretch creates display artifacts

Previous Next

Packages: ns, emacs;

Reported by: Alp Aker <aker <at> pitt.edu>

Date: Mon, 11 Apr 2011 00:45:02 UTC

Severity: normal

Done: Chong Yidong <cyd <at> stupidchicken.com>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Alp Aker <aker <at> pitt.edu>
To: 8470 <at> debbugs.gnu.org
Subject: bug#8470: ns_dumpglyphs_stretch creates display artifacts
Date: Sun, 10 Apr 2011 19:32:55 -0400 (EDT)
ns_dumpglyphs_stretch (in nsterm.m) checks to make sure that it doesn't 
overwrite a window's right fringe or scroll bar.  It doesn't perform an 
analogous check for overruns on the left.  This can cause display 
artifacts to appear when a window is horizontally scrolled.  Here is a 
screenshot showing an extreme example of what can happen:

http://www.pitt.edu/~aker/screenshot.png

The problem has been around since at least 23.2.1 and still exists in the 
trunk.

The following patch (against the latest nsterm.m) appears to fix the 
problem:

*** nsterm.m	2011-04-10 19:21:28.000000000 -0400
--- nsterm-rev.m	2011-04-10 19:23:54.000000000 -0400
***************
*** 2981,2986 ****
--- 2981,2995 ----
                                    - (WINDOW_BOX_RIGHT_EDGE_X (s->w)
                                      - WINDOW_RIGHT_FRINGE_WIDTH (s->w)));
                r[i].size.width -= overrun;
+
+               /* truncate to avoid overwriting to left of the window box */
+               int leftoverrun = (WINDOW_BOX_LEFT_EDGE_X (s->w)
+                                  + WINDOW_LEFT_FRINGE_WIDTH (s->w)) - s->x;
+               if (0 < leftoverrun)
+                 {
+                   r[i].origin.x += leftoverrun;
+                   r[i].size.width -= leftoverrun;
+                 }

                /* XXX: Try to work between problem where a stretch glyph on
                   a partially-visible bottom row will clear part of the




This bug report was last modified 13 years and 306 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.