]> git.eshelyaron.com Git - emacs.git/commitdiff
Fix frame contents scaling bug on macOS (bug#46155)
authorAlan Third <alan@idiocy.org>
Fri, 19 Feb 2021 19:25:39 +0000 (19:25 +0000)
committerAlan Third <alan@idiocy.org>
Fri, 19 Feb 2021 19:37:02 +0000 (19:37 +0000)
Discussion in bug#46406.

* src/nsterm.m ([EmacsView focusOnDrawingBuffer:]): Set the scale
factor for the backing layer.

src/nsterm.m

index b0cf5952fd503265e99d68fdf77f4def31112897..6551694abeeb4625c9ebe2d43ec6ad3e87a31423 100644 (file)
@@ -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];