aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorDaniel Pettersson2024-06-24 23:16:59 +0200
committerEli Zaretskii2024-11-02 13:15:13 +0200
commit87358e94047c7f86af1f1ac9d9469553dcd6a6e1 (patch)
treeb1b840cc09f12788362080b5be2af012ffa2e016 /src
parent4df832750c811abc5ccbe7bfcefe1ad8f144af8e (diff)
downloademacs-87358e94047c7f86af1f1ac9d9469553dcd6a6e1.tar.gz
emacs-87358e94047c7f86af1f1ac9d9469553dcd6a6e1.zip
Fix inconsistency in bitmap overlay drawing for macOS
* src/nsterm.m (ns_draw_fringe_bitmap): Respect 'overlay_p', by not clearing fringe if set, as its done in xterm. (Bug#71763)
Diffstat (limited to 'src')
-rw-r--r--src/nsterm.m32
1 files changed, 18 insertions, 14 deletions
diff --git a/src/nsterm.m b/src/nsterm.m
index f68a22d9fbc..ad3b8ba8487 100644
--- a/src/nsterm.m
+++ b/src/nsterm.m
@@ -2961,24 +2961,28 @@ ns_draw_fringe_bitmap (struct window *w, struct glyph_row *row,
2961 NSTRACE_MSG ("which:%d cursor:%d overlay:%d width:%d height:%d period:%d", 2961 NSTRACE_MSG ("which:%d cursor:%d overlay:%d width:%d height:%d period:%d",
2962 p->which, p->cursor_p, p->overlay_p, p->wd, p->h, p->dh); 2962 p->which, p->cursor_p, p->overlay_p, p->wd, p->h, p->dh);
2963 2963
2964 /* Work out the rectangle we will need to clear. */ 2964 /* Clear screen unless overlay. */
2965 clearRect = NSMakeRect (p->x, p->y, p->wd, p->h); 2965 if ( !p->overlay_p )
2966 {
2967 /* Work out the rectangle we will need to clear. */
2968 clearRect = NSMakeRect (p->x, p->y, p->wd, p->h);
2966 2969
2967 if (p->bx >= 0 && !p->overlay_p) 2970 if ( p->bx >= 0 )
2968 clearRect = NSUnionRect (clearRect, NSMakeRect (p->bx, p->by, p->nx, p->ny)); 2971 clearRect = NSUnionRect (clearRect, NSMakeRect (p->bx, p->by, p->nx, p->ny));
2969 2972
2970 /* Handle partially visible rows. */ 2973 /* Handle partially visible rows. */
2971 clearRect = NSIntersectionRect (clearRect, rowRect); 2974 clearRect = NSIntersectionRect (clearRect, rowRect);
2972 2975
2973 /* The visible portion of imageRect will always be contained within 2976 /* The visible portion of imageRect will always be contained
2974 clearRect. */ 2977 within clearRect. */
2975 ns_focus (f, &clearRect, 1); 2978 ns_focus (f, &clearRect, 1);
2976 if (! NSIsEmptyRect (clearRect)) 2979 if ( !NSIsEmptyRect (clearRect) )
2977 { 2980 {
2978 NSTRACE_RECT ("clearRect", clearRect); 2981 NSTRACE_RECT ("clearRect", clearRect);
2979 2982
2980 [[NSColor colorWithUnsignedLong:face->background] set]; 2983 [[NSColor colorWithUnsignedLong:face->background] set];
2981 NSRectFill (clearRect); 2984 NSRectFill (clearRect);
2985 }
2982 } 2986 }
2983 2987
2984 NSBezierPath *bmp = [fringe_bmp objectForKey:[NSNumber numberWithInt:p->which]]; 2988 NSBezierPath *bmp = [fringe_bmp objectForKey:[NSNumber numberWithInt:p->which]];