aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorJason Rumney2002-11-16 01:21:22 +0000
committerJason Rumney2002-11-16 01:21:22 +0000
commit2c26ee517f04bf37931718192e9a631c81a7cf8b (patch)
treee1049813d8c9298deb79ca8fa1398e32a0a804ab /src
parentc8d88d0890265e53d8e48a56406574bc96598444 (diff)
downloademacs-2c26ee517f04bf37931718192e9a631c81a7cf8b.tar.gz
emacs-2c26ee517f04bf37931718192e9a631c81a7cf8b.zip
(w32_get_glyph_string_clip_rect): Clip cursor tightly.
Diffstat (limited to 'src')
-rw-r--r--src/w32term.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/w32term.c b/src/w32term.c
index a9ab3678b37..84c9a3c1acd 100644
--- a/src/w32term.c
+++ b/src/w32term.c
@@ -3133,6 +3133,18 @@ w32_get_glyph_string_clip_rect (s, r)
3133 3133
3134 r->top = WINDOW_TO_FRAME_PIXEL_Y (s->w, r->top); 3134 r->top = WINDOW_TO_FRAME_PIXEL_Y (s->w, r->top);
3135 3135
3136 /* If drawing the cursor, don't let glyph draw outside its
3137 advertised boundaries. Cleartype does this under some circumstances. */
3138 if (s->hl == DRAW_CURSOR)
3139 {
3140 if (s->x > r->left)
3141 {
3142 r_width -= s->x - r->left;
3143 r->left = s->x;
3144 }
3145 r_width = min (r_width, s->first_glyph->pixel_width);
3146 }
3147
3136 r->bottom = r->top + r_height; 3148 r->bottom = r->top + r_height;
3137 r->right = r->left + r_width; 3149 r->right = r->left + r_width;
3138} 3150}