From 0adbc977ac7848e8092fa1d58174d0a37aabb86b Mon Sep 17 00:00:00 2001 From: Sven Gothel Date: Mon, 9 Mar 2015 15:45:36 +0100 Subject: Bug 1142 - NEWT: Add support to retrieve the primary MonitorDevice Support added for - Windows - X11 XRandR 1.3 - OSX Note: Our whole MonitorMode association handling is currently _not_ dynamic. - only on Windows we actually use native unique ID, which might not change (adapter and monitor idx) - On OSX and X11 we simply use indices, but if monitor setup changes - they refer to different instances. In case it is desired to cover dynamic monitor setup change, we need to address this issue in a new bug entry. --- src/newt/native/MacWindow.m | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src/newt/native/MacWindow.m') diff --git a/src/newt/native/MacWindow.m b/src/newt/native/MacWindow.m index 690aaa505..fbac6b37e 100644 --- a/src/newt/native/MacWindow.m +++ b/src/newt/native/MacWindow.m @@ -517,7 +517,8 @@ JNIEXPORT jintArray JNICALL Java_jogamp_newt_driver_macosx_ScreenDriver_getMonit int offset = 0; prop[offset++] = propCount; prop[offset++] = crt_idx; - prop[offset++] = 0; // is-clone + prop[offset++] = 0; // isClone + prop[offset++] = 0 == crt_idx ? 1 : 0; // isPrimary prop[offset++] = (jint) sizeMM.width; prop[offset++] = (jint) sizeMM.height; prop[offset++] = (jint) dBounds.origin.x; // rotated viewport x (pixel units, will be fixed in java code) -- cgit v1.2.3