[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
master 2129d6b: Fix slow down when moving between monitors (bug#42834)
From: |
Alan Third |
Subject: |
master 2129d6b: Fix slow down when moving between monitors (bug#42834) |
Date: |
Thu, 13 Aug 2020 14:11:30 -0400 (EDT) |
branch: master
commit 2129d6b9dcc7248ef7f0c17b1367a853b2257bfa
Author: Alan Third <alan@idiocy.org>
Commit: Alan Third <alan@idiocy.org>
Fix slow down when moving between monitors (bug#42834)
* src/nsterm.m ([EmacsView windowDidChangeBackingProperties:]):
Recreate the buffer every time.
---
src/nsterm.m | 18 +++++-------------
1 file changed, 5 insertions(+), 13 deletions(-)
diff --git a/src/nsterm.m b/src/nsterm.m
index 9f5916d..c1d133a 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 */
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- master 2129d6b: Fix slow down when moving between monitors (bug#42834),
Alan Third <=