* bug#8470: ns_dumpglyphs_stretch creates display artifacts
@ 2011-04-10 23:32 Alp Aker
2011-07-28 18:41 ` Chong Yidong
0 siblings, 1 reply; 2+ messages in thread
From: Alp Aker @ 2011-04-10 23:32 UTC (permalink / raw)
To: 8470
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
^ permalink raw reply [flat|nested] 2+ messages in thread
* bug#8470: ns_dumpglyphs_stretch creates display artifacts
2011-04-10 23:32 bug#8470: ns_dumpglyphs_stretch creates display artifacts Alp Aker
@ 2011-07-28 18:41 ` Chong Yidong
0 siblings, 0 replies; 2+ messages in thread
From: Chong Yidong @ 2011-07-28 18:41 UTC (permalink / raw)
To: Alp Aker; +Cc: 8470
Alp Aker <aker@pitt.edu> writes:
> 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:
Thanks, applied to trunk.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2011-07-28 18:41 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-04-10 23:32 bug#8470: ns_dumpglyphs_stretch creates display artifacts Alp Aker
2011-07-28 18:41 ` Chong Yidong
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.