aboutsummaryrefslogtreecommitdiffstats
path: root/src/newt
diff options
context:
space:
mode:
Diffstat (limited to 'src/newt')
-rw-r--r--src/newt/native/X11RandR13.c8
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