aboutsummaryrefslogtreecommitdiffstats
path: root/src/nsterm.m
diff options
context:
space:
mode:
authorVibhav Pant2020-08-21 14:04:35 +0530
committerVibhav Pant2020-08-21 14:04:35 +0530
commitf0f8d7b82492e741950c363a03b886965c91b1b0 (patch)
tree19b716830b1ebabc0d7d75949c4e6800c0f104ad /src/nsterm.m
parent9e64a087c4d167e7ec1c4e22bea3e6af53b563de (diff)
parentc818c29771d3cb51875643b2f6c894073e429dd2 (diff)
downloademacs-feature/native-comp-macos-fixes.tar.gz
emacs-feature/native-comp-macos-fixes.zip
Merge branch 'feature/native-comp' into feature/native-comp-macos-fixesfeature/native-comp-macos-fixes
Diffstat (limited to 'src/nsterm.m')
-rw-r--r--src/nsterm.m23
1 files changed, 6 insertions, 17 deletions
diff --git a/src/nsterm.m b/src/nsterm.m
index 9f5916d78ed..98c5b69d681 100644
--- a/src/nsterm.m
+++ b/src/nsterm.m
@@ -7669,11 +7669,8 @@ not_in_argv (NSString *arg)
7669 /* macOS Sierra automatically enables tabbed windows. We can't 7669 /* macOS Sierra automatically enables tabbed windows. We can't
7670 allow this to be enabled until it's available on a Free system. 7670 allow this to be enabled until it's available on a Free system.
7671 Currently it only happens by accident and is buggy anyway. */ 7671 Currently it only happens by accident and is buggy anyway. */
7672#if defined (NS_IMPL_COCOA) \ 7672#ifdef NS_IMPL_COCOA
7673 && MAC_OS_X_VERSION_MAX_ALLOWED >= 101200
7674#if MAC_OS_X_VERSION_MIN_REQUIRED < 101200
7675 if ([win respondsToSelector: @selector(setTabbingMode:)]) 7673 if ([win respondsToSelector: @selector(setTabbingMode:)])
7676#endif
7677 [win setTabbingMode: NSWindowTabbingModeDisallowed]; 7674 [win setTabbingMode: NSWindowTabbingModeDisallowed];
7678#endif 7675#endif
7679 7676
@@ -8424,25 +8421,17 @@ not_in_argv (NSString *arg)
8424 8421
8425 8422
8426- (void)windowDidChangeBackingProperties:(NSNotification *)notification 8423- (void)windowDidChangeBackingProperties:(NSNotification *)notification
8427 /* Update the drawing buffer when the backing scale factor changes. */ 8424 /* Update the drawing buffer when the backing properties change. */
8428{ 8425{
8429 NSTRACE ("EmacsView windowDidChangeBackingProperties:]"); 8426 NSTRACE ("EmacsView windowDidChangeBackingProperties:]");
8430 8427
8431 if (! [self wantsUpdateLayer]) 8428 if (! [self wantsUpdateLayer])
8432 return; 8429 return;
8433 8430
8434 CGFloat old = [[[notification userInfo] 8431 NSRect frame = [self frame];
8435 objectForKey:@"NSBackingPropertyOldScaleFactorKey"] 8432 [self createDrawingBuffer];
8436 doubleValue]; 8433 ns_clear_frame (emacsframe);
8437 CGFloat new = [[self window] backingScaleFactor]; 8434 expose_frame (emacsframe, 0, 0, NSWidth (frame), NSHeight (frame));
8438
8439 if (old != new)
8440 {
8441 NSRect frame = [self frame];
8442 [self createDrawingBuffer];
8443 ns_clear_frame (emacsframe);
8444 expose_frame (emacsframe, 0, 0, NSWidth (frame), NSHeight (frame));
8445 }
8446} 8435}
8447#endif /* NS_DRAW_TO_BUFFER */ 8436#endif /* NS_DRAW_TO_BUFFER */
8448 8437