From: Alan Third Date: Thu, 13 Aug 2020 18:00:41 +0000 (+0100) Subject: Fix slow down when moving between monitors (bug#42834) X-Git-Tag: emacs-28.0.90~6599 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=2129d6b9dcc7248ef7f0c17b1367a853b2257bfa;p=emacs.git Fix slow down when moving between monitors (bug#42834) * src/nsterm.m ([EmacsView windowDidChangeBackingProperties:]): Recreate the buffer every time. --- diff --git a/src/nsterm.m b/src/nsterm.m index 9f5916d78ed..c1d133a00e5 100644 --- a/src/nsterm.m +++ b/src/nsterm.m @@ -8424,25 +8424,17 @@ not_in_argv (NSString *arg) - (void)windowDidChangeBackingProperties:(NSNotification *)notification - /* Update the drawing buffer when the backing scale factor changes. */ + /* Update the drawing buffer when the backing properties change. */ { NSTRACE ("EmacsView windowDidChangeBackingProperties:]"); if (! [self wantsUpdateLayer]) return; - CGFloat old = [[[notification userInfo] - objectForKey:@"NSBackingPropertyOldScaleFactorKey"] - doubleValue]; - CGFloat new = [[self window] backingScaleFactor]; - - if (old != new) - { - NSRect frame = [self frame]; - [self createDrawingBuffer]; - ns_clear_frame (emacsframe); - expose_frame (emacsframe, 0, 0, NSWidth (frame), NSHeight (frame)); - } + NSRect frame = [self frame]; + [self createDrawingBuffer]; + ns_clear_frame (emacsframe); + expose_frame (emacsframe, 0, 0, NSWidth (frame), NSHeight (frame)); } #endif /* NS_DRAW_TO_BUFFER */