diff options
| author | Alp Aker | 2011-07-28 14:41:21 -0400 |
|---|---|---|
| committer | Chong Yidong | 2011-07-28 14:41:21 -0400 |
| commit | bf3492a57ec757c0efadb6e821daa507e499057d (patch) | |
| tree | 0e7547c2383c04fe6f862543ee8b85d9a3d6a9bf /src | |
| parent | be8ec0b3d40a22b9cb180d7cb3c9d22c81c64f14 (diff) | |
| download | emacs-bf3492a57ec757c0efadb6e821daa507e499057d.tar.gz emacs-bf3492a57ec757c0efadb6e821daa507e499057d.zip | |
Fix display artifacts from ns_dumpglyphs_stretch (Bug#8470).
* src/nsterm.m (ns_dumpglyphs_stretch): Avoid overwriting left fringe
or scroll bar.
Diffstat (limited to 'src')
| -rw-r--r-- | src/ChangeLog | 3 | ||||
| -rw-r--r-- | src/nsterm.m | 18 |
2 files changed, 18 insertions, 3 deletions
diff --git a/src/ChangeLog b/src/ChangeLog index 2bd3cf8ec35..3f9c098b99a 100644 --- a/src/ChangeLog +++ b/src/ChangeLog | |||
| @@ -9,6 +9,9 @@ | |||
| 9 | (EmacsTooltip -init): Remove bezels and add shadows to | 9 | (EmacsTooltip -init): Remove bezels and add shadows to |
| 10 | tooltip windows. | 10 | tooltip windows. |
| 11 | 11 | ||
| 12 | * nsterm.m (ns_dumpglyphs_stretch): Avoid overwriting left fringe | ||
| 13 | or scroll bar (Bug#8470). | ||
| 14 | |||
| 12 | 2011-07-28 Alp Aker <alp.tekin.aker@gmail.com> | 15 | 2011-07-28 Alp Aker <alp.tekin.aker@gmail.com> |
| 13 | 16 | ||
| 14 | Implement strike-through and overline on NextStep (Bug#8863). | 17 | Implement strike-through and overline on NextStep (Bug#8863). |
diff --git a/src/nsterm.m b/src/nsterm.m index e9e7dcc0804..d4b1a3f8473 100644 --- a/src/nsterm.m +++ b/src/nsterm.m | |||
| @@ -3110,12 +3110,24 @@ ns_dumpglyphs_stretch (struct glyph_string *s) | |||
| 3110 | { | 3110 | { |
| 3111 | if (!s->row->full_width_p) | 3111 | if (!s->row->full_width_p) |
| 3112 | { | 3112 | { |
| 3113 | int overrun, leftoverrun; | ||
| 3114 | |||
| 3113 | /* truncate to avoid overwriting fringe and/or scrollbar */ | 3115 | /* truncate to avoid overwriting fringe and/or scrollbar */ |
| 3114 | int overrun = max (0, (s->x + s->background_width) | 3116 | overrun = max (0, (s->x + s->background_width) |
| 3115 | - (WINDOW_BOX_RIGHT_EDGE_X (s->w) | 3117 | - (WINDOW_BOX_RIGHT_EDGE_X (s->w) |
| 3116 | - WINDOW_RIGHT_FRINGE_WIDTH (s->w))); | 3118 | - WINDOW_RIGHT_FRINGE_WIDTH (s->w))); |
| 3117 | r[i].size.width -= overrun; | 3119 | r[i].size.width -= overrun; |
| 3118 | 3120 | ||
| 3121 | /* truncate to avoid overwriting to left of the window box */ | ||
| 3122 | leftoverrun = (WINDOW_BOX_LEFT_EDGE_X (s->w) | ||
| 3123 | + WINDOW_LEFT_FRINGE_WIDTH (s->w)) - s->x; | ||
| 3124 | |||
| 3125 | if (leftoverrun > 0) | ||
| 3126 | { | ||
| 3127 | r[i].origin.x += leftoverrun; | ||
| 3128 | r[i].size.width -= leftoverrun; | ||
| 3129 | } | ||
| 3130 | |||
| 3119 | /* XXX: Try to work between problem where a stretch glyph on | 3131 | /* XXX: Try to work between problem where a stretch glyph on |
| 3120 | a partially-visible bottom row will clear part of the | 3132 | a partially-visible bottom row will clear part of the |
| 3121 | modeline, and another where list-buffers headers and similar | 3133 | modeline, and another where list-buffers headers and similar |