From fa759d8ffdd6c2a66270e8e85a53f608f4cd7ad0 Mon Sep 17 00:00:00 2001 From: Ton Roosendaal Date: Sat, 12 Jan 2013 17:07:49 +0000 Subject: Mac HiDPI ("retina") handling: OK - so you have this nice crisp screen, and still you want to add extra monitors to the laptop! That means Blender should switch back and forth to HiDPI modes, when you move a window to another monitor. This code makes the pixelsize scale factor a window property, and handles an event when a window moves to another monitor. It then changes the native pixelsize nicely and refreshes entire UI. You can also have one Blender window on high, and other on low resolution. Stretching a Blender window from 1 monitor to the other works too, but that is Apple magic handling it. --- intern/ghost/GHOST_IWindow.h | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'intern/ghost/GHOST_IWindow.h') diff --git a/intern/ghost/GHOST_IWindow.h b/intern/ghost/GHOST_IWindow.h index 88f130aabe8..4cf0dbfb820 100644 --- a/intern/ghost/GHOST_IWindow.h +++ b/intern/ghost/GHOST_IWindow.h @@ -305,6 +305,10 @@ public: */ virtual GHOST_TSuccess setCursorGrab(GHOST_TGrabCursorMode mode, GHOST_Rect *bounds, GHOST_TInt32 mouse_ungrab_xy[2]) { return GHOST_kSuccess; } + + virtual float getNativePixelSize(void) = 0; + + #ifdef WITH_CXX_GUARDEDALLOC MEM_CXX_CLASS_ALLOC_FUNCS("GHOST:GHOST_IWindow") #endif -- cgit v1.2.3