changeset in /hg/icedtea: 2008-04-09 Dan Munckton <lists at munck...

doko at ubuntu.com doko at ubuntu.com
Thu May 29 14:13:01 PDT 2008


changeset 5d2b5714c8c2 in /hg/icedtea
details: http://icedtea.classpath.org/hg/icedtea?cmd=changeset;node=5d2b5714c8c2
description:
	2008-04-09  Dan Munckton  <lists at munckfish.net>

	        * patches/icedtea-xinerama.patch: Make Java Full Screen Exclusive Mode
	        work again with Xorg Server 1.3 and above (Java bug 6636469).

diffstat:

4 files changed, 91 insertions(+)
ChangeLog                      |    5 ++
Makefile.am                    |    1 
Makefile.in                    |    1 
patches/icedtea-xinerama.patch |   84 ++++++++++++++++++++++++++++++++++++++++

diffs (122 lines):

diff -r adf994e62613 -r 5d2b5714c8c2 ChangeLog
--- a/ChangeLog	Wed Apr 09 09:54:24 2008 -0400
+++ b/ChangeLog	Wed Apr 09 22:22:44 2008 +0200
@@ -1,3 +1,8 @@ 2008-04-09  Lillian Angel  <langel at redha
+2008-04-09  Dan Munckton  <lists at munckfish.net>
+
+	* patches/icedtea-xinerama.patch: Make Java Full Screen Exclusive Mode
+	work again with Xorg Server 1.3 and above (Java bug 6636469).
+
 2008-04-09  Lillian Angel  <langel at redhat.com>
 
 	* patches/icedtea-libraries.patch: Updated LDLIBS for jpeg.
diff -r adf994e62613 -r 5d2b5714c8c2 Makefile.am
--- a/Makefile.am	Wed Apr 09 09:54:24 2008 -0400
+++ b/Makefile.am	Wed Apr 09 22:22:44 2008 +0200
@@ -289,6 +289,7 @@ ICEDTEA_PATCHES = \
 	patches/icedtea-zero-build.patch \
 	patches/icedtea-print-lsb-release.patch \
 	patches/icedtea-jpegclasses.patch \
+	patches/icedtea-xinerama.patch \
 	patches/icedtea-arm-uname.patch \
 	$(GCC_PATCH) \
 	$(FAST_BUILD_PATCH) \
diff -r adf994e62613 -r 5d2b5714c8c2 Makefile.in
--- a/Makefile.in	Wed Apr 09 09:54:24 2008 -0400
+++ b/Makefile.in	Wed Apr 09 22:22:44 2008 +0200
@@ -392,6 +392,7 @@ ICEDTEA_PATCHES = $(ZERO_PATCHES_COND) \
 	patches/icedtea-zero-build.patch \
 	patches/icedtea-print-lsb-release.patch \
 	patches/icedtea-jpegclasses.patch \
+	patches/icedtea-xinerama.patch \
 	patches/icedtea-arm-uname.patch $(GCC_PATCH) \
 	$(FAST_BUILD_PATCH) $(DISTRIBUTION_PATCHES) $(am__append_5)
 
diff -r adf994e62613 -r 5d2b5714c8c2 patches/icedtea-xinerama.patch
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/patches/icedtea-xinerama.patch	Wed Apr 09 22:22:44 2008 +0200
@@ -0,0 +1,84 @@
+--- openjdk/jdk/src/solaris/native/sun/awt/awt_GraphicsEnv.c
++++ openjdk/jdk/src/solaris/native/sun/awt/awt_GraphicsEnv.c
+@@ -1626,6 +1626,8 @@ Java_sun_awt_X11GraphicsEnvironment_getX
+ 
+ #define BIT_DEPTH_MULTI java_awt_DisplayMode_BIT_DEPTH_MULTI
+ 
++typedef Status
++    (*XRRQueryVersionType) (Display *dpy, int *major_versionp, int *minor_versionp);
+ typedef XRRScreenConfiguration*
+     (*XRRGetScreenInfoType)(Display *dpy, Drawable root);
+ typedef void
+@@ -1650,6 +1652,7 @@ typedef Status
+                                      short rate,
+                                      Time timestamp);
+ 
++static XRRQueryVersionType               awt_XRRQueryVersion;
+ static XRRGetScreenInfoType              awt_XRRGetScreenInfo;
+ static XRRFreeScreenConfigInfoType       awt_XRRFreeScreenConfigInfo;
+ static XRRConfigRatesType                awt_XRRConfigRates;
+@@ -1672,11 +1675,48 @@ static jboolean
+ static jboolean
+ X11GD_InitXrandrFuncs(JNIEnv *env)
+ {
++    int rr_maj_ver = 0, rr_min_ver = 0;
++
+     void *pLibRandR = dlopen("libXrandr.so.2", RTLD_LAZY | RTLD_LOCAL);
+     if (pLibRandR == NULL) {
+         J2dRlsTraceLn(J2D_TRACE_ERROR,
+                       "X11GD_InitXrandrFuncs: Could not open libXrandr.so.2");
+         return JNI_FALSE;
++    }
++
++    LOAD_XRANDR_FUNC(XRRQueryVersion);
++
++    if (!(*awt_XRRQueryVersion)(awt_display, &rr_maj_ver, &rr_min_ver)) {
++        J2dRlsTraceLn(J2D_TRACE_ERROR, 
++                    "X11GD_InitXrandrFuncs: XRRQueryVersion returned an error status");
++        dlclose(pLibRandR);
++        return JNI_FALSE;
++    }
++
++    if (usingXinerama) {
++        /* 
++         * We can proceed as long as this is RANDR 1.2 or above.
++         * As of Xorg server 1.3 onwards the Xinerama backend may actually be
++         * a fake one provided by RANDR itself. See Java bug 6636469 for info.
++         */
++        if (!(rr_maj_ver > 1 || (rr_maj_ver == 1 && rr_min_ver >= 2))) {
++            J2dRlsTraceLn2(J2D_TRACE_INFO, "X11GD_InitXrandrFuncs: Can't use Xrandr. " 
++                        "Xinerama is active and Xrandr version is %d.%d",
++                        rr_maj_ver, rr_min_ver);
++            dlclose(pLibRandR);
++            return JNI_FALSE;
++        }
++
++        /*
++         * REMIND: Fullscreen mode doesn't work quite right with multi-monitor
++         * setups and RANDR 1.2. So for now we also require a single screen.
++         */
++        if (awt_numScreens > 1 ) {
++            J2dRlsTraceLn(J2D_TRACE_INFO, "X11GD_InitXrandrFuncs: Can't use Xrandr. " 
++                        "Multiple screens in use");
++            dlclose(pLibRandR);
++            return JNI_FALSE;
++        }
+     }
+ 
+     LOAD_XRANDR_FUNC(XRRGetScreenInfo);
+@@ -1814,15 +1854,6 @@ Java_sun_awt_X11GraphicsDevice_initXrand
+     int opcode = 0, firstEvent = 0, firstError = 0;
+     jboolean ret;
+ 
+-    if (usingXinerama) {
+-        /*
+-         * REMIND: we'll just punt if Xinerama is enabled; we can remove this
+-         * restriction in the future if we find Xinerama and XRandR playing
+-         * well together...
+-         */
+-        return JNI_FALSE;
+-    }
+-
+     AWT_LOCK();
+     ret = (jboolean)XQueryExtension(awt_display, "RANDR",
+                                     &opcode, &firstEvent, &firstError);



More information about the distro-pkg-dev mailing list