From: Alan Third Date: Fri, 19 Feb 2021 19:25:39 +0000 (+0000) Subject: Fix frame contents scaling bug on macOS (bug#46155) X-Git-Tag: emacs-28.0.90~3645 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=283f98353fe3549ac8f66a3ab8fba85d93c81a88;p=emacs.git 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. --- 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) surface = [[EmacsSurface alloc] initWithSize:s ColorSpace:[[[self window] colorSpace] CGColorSpace]]; + + /* Since we're using NSViewLayerContentsRedrawOnSetNeedsDisplay + the layer's scale factor is not set automatically, so do it + now. */ + [[self layer] setContentsScale:[[self window] backingScaleFactor]]; } CGContextRef context = [surface getContext];