diff options
author | Xerxes Rånby <[email protected]> | 2015-08-16 04:38:39 +0200 |
---|---|---|
committer | Xerxes Rånby <[email protected]> | 2015-08-16 04:38:39 +0200 |
commit | a213c39fa9d741d519df56bc4d4abb86113985f4 (patch) | |
tree | cfd36bea3a26c1091818838f46a7776962c3348b /src/newt/native | |
parent | 23d8cbd413ac6aca737d7a7d062c8bb6f5ac1ca5 (diff) |
Bug 1183: X11RandR13 XRRGetScreenResourcesCurrent _occasionally_ reports empty data
Diffstat (limited to 'src/newt/native')
-rw-r--r-- | src/newt/native/X11RandR13.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/newt/native/X11RandR13.c b/src/newt/native/X11RandR13.c index 0dd53feb8..3f9dff289 100644 --- a/src/newt/native/X11RandR13.c +++ b/src/newt/native/X11RandR13.c @@ -39,6 +39,14 @@ JNIEXPORT jlong JNICALL Java_jogamp_newt_driver_x11_RandR13_getScreenResources0 Display *dpy = (Display *) (intptr_t) display; Window root = RootWindow(dpy, (int)screen_idx); + /* Bug 1183 + * XRRGetScreenResourcesCurrent (or XRRGetScreenResources) + * _occasionally_ reports empty data + * unless XRRGetScreenSizeRange has been called once. + */ + int minWidth, minHeight, maxWidth, maxHeight; + XRRGetScreenSizeRange ( dpy, root, &minWidth, &minHeight, &maxWidth, &maxHeight); + XRRScreenResources *res = XRRGetScreenResourcesCurrent( dpy, root); // 1.3 // XRRScreenResources *res = XRRGetScreenResources( dpy, root); // 1.2 |