unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Alp Aker <aker@pitt.edu>
To: 8470@debbugs.gnu.org
Subject: bug#8470: ns_dumpglyphs_stretch creates display artifacts
Date: Sun, 10 Apr 2011 19:32:55 -0400 (EDT)	[thread overview]
Message-ID: <Pine.GSO.4.63.1104101740510.13127@unixs1.cis.pitt.edu> (raw)

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





             reply	other threads:[~2011-04-10 23:32 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-04-10 23:32 Alp Aker [this message]
2011-07-28 18:41 ` bug#8470: ns_dumpglyphs_stretch creates display artifacts Chong Yidong

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=Pine.GSO.4.63.1104101740510.13127@unixs1.cis.pitt.edu \
    --to=aker@pitt.edu \
    --cc=8470@debbugs.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).