[Bf-blender-cvs] [801901a6521] blender2.7: Fix T57069: macOS window contents scaling bug.

Brecht Van Lommel noreply at git.blender.org
Mon Jan 28 12:03:56 CET 2019


Commit: 801901a65210cf3556ed9f0818e3f694483be24b
Author: Brecht Van Lommel
Date:   Mon Jan 28 11:58:00 2019 +0100
Branches: blender2.7
https://developer.blender.org/rB801901a65210cf3556ed9f0818e3f694483be24b

Fix T57069: macOS window contents scaling bug.

The cause of this is unclear, but delaying querying the native pixel size
appears to help in the one case I could reproduce.

===================================================================

M	intern/ghost/intern/GHOST_WindowCocoa.mm

===================================================================

diff --git a/intern/ghost/intern/GHOST_WindowCocoa.mm b/intern/ghost/intern/GHOST_WindowCocoa.mm
index 79d2f304e60..8b9660463dd 100644
--- a/intern/ghost/intern/GHOST_WindowCocoa.mm
+++ b/intern/ghost/intern/GHOST_WindowCocoa.mm
@@ -571,11 +571,6 @@ GHOST_WindowCocoa::GHOST_WindowCocoa(
 	updateDrawingContext();
 	activateDrawingContext();
 
-	if (m_systemCocoa->m_nativePixel) {
-		NSRect backingBounds = [m_openGLView convertRectToBacking:[m_openGLView bounds]];
-		m_nativePixelSize = (float)backingBounds.size.width / (float)rect.size.width;
-	}
-	
 	setTitle(title);
 	
 	m_tablet.Active = GHOST_kTabletModeNone;
@@ -599,6 +594,8 @@ GHOST_WindowCocoa::GHOST_WindowCocoa(
 	if (state == GHOST_kWindowStateFullScreen)
 		setState(GHOST_kWindowStateFullScreen);
 
+	setNativePixelSize();
+
 	[pool drain];
 }



More information about the Bf-blender-cvs mailing list