From b34cd84c1b070248b396d2ec82018be99b529d31 Mon Sep 17 00:00:00 2001 From: Alan Third Date: Fri, 9 Jun 2023 20:53:31 +0100 Subject: [PATCH] Reduce graphical glitches in certain circumstances on macOS (bug#63187) * src/nsterm.m (ns_scroll_run): Change way we request the frame is redrawn to the glass-we no longer invalidate regions. ([EmacsLayer display]): Get rid of this asynchronous call, it may be causing unexpected glitches during rapid updates. --- src/nsterm.m | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/src/nsterm.m b/src/nsterm.m index 3e089cc1ff1..673fdf31531 100644 --- a/src/nsterm.m +++ b/src/nsterm.m @@ -2708,8 +2708,9 @@ Hide the window (X11 semantics) EmacsView *view = FRAME_NS_VIEW (f); [view copyRect:srcRect to:dest]; -#ifdef NS_IMPL_COCOA - [view setNeedsDisplayInRect:destRect]; +#if defined (NS_IMPL_COCOA) && MAC_OS_X_VERSION_MIN_REQUIRED >= 101400 + /* I don't know if we even need this... */ + [view setNeedsDisplay:YES]; #endif } @@ -10633,12 +10634,6 @@ - (void) display /* Put currentSurface back on the end of the cache. */ [cache addObject:(id)currentSurface]; currentSurface = NULL; - - /* Schedule a run of getContext so that if Emacs is idle it will - perform the buffer copy, etc. */ - [self performSelectorOnMainThread:@selector (getContext) - withObject:nil - waitUntilDone:NO]; } } -- 2.39.1