From 6516a52d3da5cced924db63b64af911d55355325 Mon Sep 17 00:00:00 2001 From: Sven Gothel Date: Tue, 27 Jan 2015 00:49:51 +0100 Subject: Bug 1120 - Refine HiDPI Support ( Part-2 ) (API CHANGE) - Use float[2] for pixel-scale. Utilize simple integer rounding: int-pixel-units = (int) ( int-window-units * pixel-scale + 0.5f ) - Provide minimum and maximum allowed pixel-scale values to be set by platform, supporting generic pixel-scale validation. - Remove 'OSXUtil.GetPixelScale(final RectangleImmutable r, final int[] screenIndexOut)', implementation for all platforms would cause huge redundancy of Screen and MonitorDevice code (duplication of NEWT). - instead, add 'float[2] pixelScale' to NEWT's MonitorDevice - Detect change of pixel-scale and propagate accordingly. This allows GLCanvas, GLJPanel and NewtCanvasAWT instances to be dragged between monitor devices w/ different pixel-scale. - OSX: Handle native triggered reshape events off-thread to avoid EDT congestion due to locked window when consuming deferred events on EDT. --- src/newt/native/MacWindow.m | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/newt/native/MacWindow.m') diff --git a/src/newt/native/MacWindow.m b/src/newt/native/MacWindow.m index 2bd11da3c..1dbe2b7bd 100644 --- a/src/newt/native/MacWindow.m +++ b/src/newt/native/MacWindow.m @@ -420,7 +420,7 @@ NS_ENDHANDLER CGDirectDisplayID NewtScreen_getCGDirectDisplayIDByNSScreen(NSScreen *screen) { - // Mind: typedef uint32_t CGDirectDisplayID; - however, we assume it's 64bit on 64bit ?! + // Mind: typedef uint32_t CGDirectDisplayID; NSDictionary * dict = [screen deviceDescription]; NSNumber * val = (NSNumber *) [dict objectForKey: @"NSScreenNumber"]; // [NSNumber integerValue] returns NSInteger which is 32 or 64 bit native size -- cgit v1.2.3