diff options
| author | Alan Third | 2021-02-19 19:25:39 +0000 |
|---|---|---|
| committer | Alan Third | 2021-02-19 19:37:02 +0000 |
| commit | 283f98353fe3549ac8f66a3ab8fba85d93c81a88 (patch) | |
| tree | 54995818c674181b452a07446626592965dcbc70 /src | |
| parent | b6eccad06c89eea878c1464571255fe8ce5c6d86 (diff) | |
| download | emacs-283f98353fe3549ac8f66a3ab8fba85d93c81a88.tar.gz emacs-283f98353fe3549ac8f66a3ab8fba85d93c81a88.zip | |
Fix frame contents scaling bug on macOS (bug#46155)
Discussion in bug#46406.
* src/nsterm.m ([EmacsView focusOnDrawingBuffer:]): Set the scale
factor for the backing layer.
Diffstat (limited to 'src')
| -rw-r--r-- | src/nsterm.m | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/nsterm.m b/src/nsterm.m index b0cf5952fd5..6551694abee 100644 --- a/src/nsterm.m +++ b/src/nsterm.m | |||
| @@ -8377,6 +8377,11 @@ not_in_argv (NSString *arg) | |||
| 8377 | surface = [[EmacsSurface alloc] initWithSize:s | 8377 | surface = [[EmacsSurface alloc] initWithSize:s |
| 8378 | ColorSpace:[[[self window] colorSpace] | 8378 | ColorSpace:[[[self window] colorSpace] |
| 8379 | CGColorSpace]]; | 8379 | CGColorSpace]]; |
| 8380 | |||
| 8381 | /* Since we're using NSViewLayerContentsRedrawOnSetNeedsDisplay | ||
| 8382 | the layer's scale factor is not set automatically, so do it | ||
| 8383 | now. */ | ||
| 8384 | [[self layer] setContentsScale:[[self window] backingScaleFactor]]; | ||
| 8380 | } | 8385 | } |
| 8381 | 8386 | ||
| 8382 | CGContextRef context = [surface getContext]; | 8387 | CGContextRef context = [surface getContext]; |