]> git.eshelyaron.com Git - emacs.git/commitdiff
Fix slow down when moving between monitors (bug#42834)
authorAlan Third <alan@idiocy.org>
Thu, 13 Aug 2020 18:00:41 +0000 (19:00 +0100)
committerAlan Third <alan@idiocy.org>
Thu, 13 Aug 2020 18:11:10 +0000 (19:11 +0100)
* src/nsterm.m ([EmacsView windowDidChangeBackingProperties:]):
Recreate the buffer every time.

src/nsterm.m

index 9f5916d78edc0735a533aa83fc281c76b935890f..c1d133a00e56dc86fa37728432f911e1440f6e53 100644 (file)
@@ -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 */