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.
This commit is contained in:
parent
d377cd5db1
commit
801901a652
Notes:
blender-bot
2023-02-14 10:43:47 +01:00
Referenced by issue #57069, macOS screen scaling wrong on startup
|
@ -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];
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue