From 56d60b36798fa8dae48bf2aa5e2de6f3178ab0d1 Mon Sep 17 00:00:00 2001 From: Sven Gothel Date: Mon, 26 May 2014 18:54:27 +0200 Subject: Bug 741 HiDPI: Refine Monitor/Screen [virtual] Viewport Definition / Add NEWT Support / Fix JAWT getPixelScale deadlock - NativeWindow/Surface/NEWT API DOC: Define Coordinate System of Window and Screen - OSXUtil: Add getPixelScale(..) via Screen index and 'windowOrView' - JAWTWindow/JAWTUtil.getPixelScale(..): Use pre-fetched AWT GraphicsConfiguration to solve AWT-TreeLock (deadlock) - [Virtual] Viewport of MonitorDevice and Screen: - Properly calculate and expose [virtual] viewport in window and pixel units - OSX Monitor viewports in pixel units are 'reconstructed' - Window/Viewport to Monitor selection shall be perfomed via window units (unique) - OSX NEWT Window create/init (native): Use given size and coordinates even in fullscreen mode Don't override by quering NSScreen coordinates, trust given values. - Fix test cases, i.e. usage of pixel- and window-units --- src/newt/native/X11RandR13.c | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) (limited to 'src/newt/native/X11RandR13.c') diff --git a/src/newt/native/X11RandR13.c b/src/newt/native/X11RandR13.c index 92c20e893..4e92a32b4 100644 --- a/src/newt/native/X11RandR13.c +++ b/src/newt/native/X11RandR13.c @@ -426,10 +426,14 @@ JNIEXPORT jintArray JNICALL Java_jogamp_newt_driver_x11_RandR13_getMonitorDevice prop[propIndex++] = crt_idx; prop[propIndex++] = xrrOutputInfo->mm_width; prop[propIndex++] = xrrOutputInfo->mm_height; - prop[propIndex++] = xrrCrtcInfo->x; - prop[propIndex++] = xrrCrtcInfo->y; - prop[propIndex++] = xrrCrtcInfo->width; - prop[propIndex++] = xrrCrtcInfo->height; + prop[propIndex++] = xrrCrtcInfo->x; // rotated viewport pixel units + prop[propIndex++] = xrrCrtcInfo->y; // rotated viewport pixel units + prop[propIndex++] = xrrCrtcInfo->width; // rotated viewport pixel units + prop[propIndex++] = xrrCrtcInfo->height; // rotated viewport pixel units + prop[propIndex++] = xrrCrtcInfo->x; // rotated viewport window units (same) + prop[propIndex++] = xrrCrtcInfo->y; // rotated viewport window units (same) + prop[propIndex++] = xrrCrtcInfo->width; // rotated viewport window units (same) + prop[propIndex++] = xrrCrtcInfo->height; // rotated viewport window units (same) prop[propIndex++] = xrrCrtcInfo->mode; // current mode id prop[propIndex++] = NewtScreen_XRotation2Degree(env, xrrCrtcInfo->rotation); int i; -- cgit v1.2.3