diff options
author | Sven Gothel <[email protected]> | 2015-02-17 01:14:49 +0100 |
---|---|---|
committer | Sven Gothel <[email protected]> | 2015-02-17 01:14:49 +0100 |
commit | 559ecad2a2387ba0aa34ce9e35ca8a2c5a31e655 (patch) | |
tree | a9ba7f77524851deb54269fc455aa529edfbd018 /src/newt/native/X11RandR13.c | |
parent | 42d88f99cfa62304943a7b37700653e627b13e61 (diff) |
NEWT MonitorDevice: Identify cloned devices (fully covered) ; Windows: Iterate-over and identify all adapter:monitor. (Bug 1129)
- Identify cloned devices (fully covered)
- MonitorDevice gets 'isCloned()' to identify whether
it is a cloned device, i.e. fully covered by another monitor.
This detection may happen natively but will always performed
platform agnostic.
- getMainMonitor(..) now exclude 'cloned' devices
- Windows: Iterate-over and identify all adapter:monitor
- Since we also list cloned monitor,
we need to iterate over all adapter and all it's monitor-devices.
- The native monitor-id is now defined as: ( adapter-idx << 8 ) | monitor-idx.
- Bug 1129 <- listed under this bug entry for convenience
Diffstat (limited to 'src/newt/native/X11RandR13.c')
-rw-r--r-- | src/newt/native/X11RandR13.c | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/src/newt/native/X11RandR13.c b/src/newt/native/X11RandR13.c index 4e92a32b4..5eacbf216 100644 --- a/src/newt/native/X11RandR13.c +++ b/src/newt/native/X11RandR13.c @@ -67,9 +67,16 @@ static void dumpOutputs(const char *prefix, Display *dpy, XRRScreenResources *re for(i=0; i<noutput; i++) { RROutput output = outputs[i]; XRROutputInfo * xrrOutputInfo = XRRGetOutputInfo (dpy, resources, output); - fprintf(stderr, " Output[%d]: id %#lx, crtx 0x%X, name %s (%d), %lux%lu, ncrtc %d, .., nmode %d (preferred %d)\n", - i, output, xrrOutputInfo->crtc, SAFE_STRING(xrrOutputInfo->name), xrrOutputInfo->nameLen, xrrOutputInfo->mm_width, xrrOutputInfo->mm_height, - xrrOutputInfo->ncrtc, xrrOutputInfo->nmode, xrrOutputInfo->npreferred); + fprintf(stderr, " Output[%d]: id %#lx, crtx 0x%X, name %s (%d), %lux%lu, ncrtc %d, nclone %d, nmode %d (preferred %d)\n", + i, output, xrrOutputInfo->crtc, SAFE_STRING(xrrOutputInfo->name), xrrOutputInfo->nameLen, + xrrOutputInfo->mm_width, xrrOutputInfo->mm_height, + xrrOutputInfo->ncrtc, xrrOutputInfo->nclone, xrrOutputInfo->nmode, xrrOutputInfo->npreferred); + for(j=0; j<xrrOutputInfo->ncrtc; j++) { + fprintf(stderr, " Output[%d].Crtc[%d].id %#lx\n", i, j, xrrOutputInfo->crtcs[j]); + } + for(j=0; j<xrrOutputInfo->nclone; j++) { + fprintf(stderr, " Output[%d].Clones[%d].id %#lx\n", i, j, xrrOutputInfo->clones[j]); + } for(j=0; j<xrrOutputInfo->nmode; j++) { fprintf(stderr, " Output[%d].Mode[%d].id %#lx\n", i, j, xrrOutputInfo->modes[j]); } @@ -424,6 +431,7 @@ JNIEXPORT jintArray JNICALL Java_jogamp_newt_driver_x11_RandR13_getMonitorDevice prop[propIndex++] = propCount; prop[propIndex++] = crt_idx; + prop[propIndex++] = 0; // is_clone, does not work: 0 < xrrOutputInfo->nclone ? 1 : 0; prop[propIndex++] = xrrOutputInfo->mm_width; prop[propIndex++] = xrrOutputInfo->mm_height; prop[propIndex++] = xrrCrtcInfo->x; // rotated viewport pixel units |