diff options
author | Ton Roosendaal <ton@blender.org> | 2013-01-22 22:07:17 +0400 |
---|---|---|
committer | Ton Roosendaal <ton@blender.org> | 2013-01-22 22:07:17 +0400 |
commit | 9e30e7cdaffc3b07d18fe58362bc289571f99b34 (patch) | |
tree | 58a28b1f54212358670ae98ee2661f71ed8f8709 /intern/ghost | |
parent | 8e2dd1c351c83f567cf498d3d4c9a5995d00686e (diff) |
Bug fix #33911
When you open a Blender window larger than a screen, Macs clip it to match the height,
but they allow the width to be more.
Problem is that this clipping happens after all window opening code. That causes
check for HiDPI mode to fail.
Now it checks it again on event GHOST_kEventWindowUpdate, which is only on startup.
Diffstat (limited to 'intern/ghost')
-rw-r--r-- | intern/ghost/intern/GHOST_SystemCocoa.mm | 4 | ||||
-rw-r--r-- | intern/ghost/intern/GHOST_WindowCocoa.mm | 1 |
2 files changed, 4 insertions, 1 deletions
diff --git a/intern/ghost/intern/GHOST_SystemCocoa.mm b/intern/ghost/intern/GHOST_SystemCocoa.mm index 77417a9e0af..1665180b687 100644 --- a/intern/ghost/intern/GHOST_SystemCocoa.mm +++ b/intern/ghost/intern/GHOST_SystemCocoa.mm @@ -1038,6 +1038,10 @@ GHOST_TSuccess GHOST_SystemCocoa::handleWindowEvent(GHOST_TEventType eventType, pushEvent( new GHOST_Event(getMilliSeconds(), GHOST_kEventWindowDeactivate, window) ); break; case GHOST_kEventWindowUpdate: + if (m_nativePixel) { + window->setNativePixelSize(); + pushEvent( new GHOST_Event(getMilliSeconds(), GHOST_kEventNativeResolutionChange, window) ); + } pushEvent( new GHOST_Event(getMilliSeconds(), GHOST_kEventWindowUpdate, window) ); break; case GHOST_kEventWindowMove: diff --git a/intern/ghost/intern/GHOST_WindowCocoa.mm b/intern/ghost/intern/GHOST_WindowCocoa.mm index 772db85b190..43d3dcb76e7 100644 --- a/intern/ghost/intern/GHOST_WindowCocoa.mm +++ b/intern/ghost/intern/GHOST_WindowCocoa.mm @@ -927,7 +927,6 @@ void GHOST_WindowCocoa::setNativePixelSize(void) getClientBounds(rect); m_nativePixelSize = (float)backingBounds.size.width / (float)rect.getWidth(); - } /** |