aboutsummaryrefslogtreecommitdiffstats
path: root/src/newt/native/MacWindow.m
diff options
context:
space:
mode:
authorSven Gothel <[email protected]>2015-03-09 15:45:36 +0100
committerSven Gothel <[email protected]>2015-03-09 15:45:36 +0100
commit0adbc977ac7848e8092fa1d58174d0a37aabb86b (patch)
tree3917a3cd756df3fdaa4320bfc4ebc9c32bb43f71 /src/newt/native/MacWindow.m
parentf0f6ee411efb97d34c443c070bb640c8d8a8333f (diff)
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.
Diffstat (limited to 'src/newt/native/MacWindow.m')
-rw-r--r--src/newt/native/MacWindow.m3
1 files changed, 2 insertions, 1 deletions
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)