aboutsummaryrefslogtreecommitdiffstats
path: root/java/jdk16
diff options
context:
space:
mode:
authorglewis <glewis@FreeBSD.org>2005-10-13 23:18:25 +0800
committerglewis <glewis@FreeBSD.org>2005-10-13 23:18:25 +0800
commitab0862b25a1d9f96147bb0e1b9cb6110708df31b (patch)
tree65cc38aa6b45ed21a349fafe967a5d412401509e /java/jdk16
parent9b0abd41ea8e84601e04788a249d586e30d55a26 (diff)
downloadfreebsd-ports-gnome-ab0862b25a1d9f96147bb0e1b9cb6110708df31b.tar.gz
freebsd-ports-gnome-ab0862b25a1d9f96147bb0e1b9cb6110708df31b.tar.zst
freebsd-ports-gnome-ab0862b25a1d9f96147bb0e1b9cb6110708df31b.zip
. Switch to using XToolkit by default. According to
http://java.sun.com/j2se/1.5.0/docs/guide/awt/1.5/xawt.html it has some advantages over XToolkit. Its also the default on Linux and Solaris will be switching to it. Some people have reported that it fixes a crash in the browser plugin for them. Please let me know straight away if this causes problems, particularly with Swing, as it hasn't been extensively tested. The web page mentioned above explains how to switch the toolkits dynamically so you can compare them. Submitted by: Huang wen hui <hwh@gddsn.org.cn> (the awt_LoadLibrary.c patch) Approved by: phantom (maintainer)
Diffstat (limited to 'java/jdk16')
-rw-r--r--java/jdk16/files/patch-j2se::awt::Toolkit.java20
-rw-r--r--java/jdk16/files/patch-j2se::awt::awt_LoadLibrary.c14
2 files changed, 34 insertions, 0 deletions
diff --git a/java/jdk16/files/patch-j2se::awt::Toolkit.java b/java/jdk16/files/patch-j2se::awt::Toolkit.java
new file mode 100644
index 000000000000..704fbc3aded1
--- /dev/null
+++ b/java/jdk16/files/patch-j2se::awt::Toolkit.java
@@ -0,0 +1,20 @@
+$FreeBSD$
+
+--- ../../j2se/src/share/classes/java/awt/Toolkit.java 10 Jan 2005 07:40:41 -0000 1.2
++++ ../../j2se/src/share/classes/java/awt/Toolkit.java 9 Oct 2005 04:11:13 -0000
+@@ -809,12 +809,11 @@
+ try {
+ String defaultToolkit;
+
+- /* XXXBSD: analyze and choose better one */
+- if (System.getProperty("os.name").equals("Linux")) {
+- defaultToolkit = "sun.awt.X11.XToolkit";
++ if (System.getProperty("os.name").equals("SunOS")) {
++ defaultToolkit = "sun.awt.motif.MToolkit";
+ }
+ else {
+- defaultToolkit = "sun.awt.motif.MToolkit";
++ defaultToolkit = "sun.awt.X11.XToolkit";
+ }
+ nm = System.getProperty("awt.toolkit",
+ defaultToolkit);
diff --git a/java/jdk16/files/patch-j2se::awt::awt_LoadLibrary.c b/java/jdk16/files/patch-j2se::awt::awt_LoadLibrary.c
new file mode 100644
index 000000000000..78f72ff9b612
--- /dev/null
+++ b/java/jdk16/files/patch-j2se::awt::awt_LoadLibrary.c
@@ -0,0 +1,14 @@
+$FreeBSD$
+
+--- ../../j2se/src/solaris/native/sun/awt/awt_LoadLibrary.c 10 Jan 2005 15:09:40 -0000 1.2
++++ ../../j2se/src/solaris/native/sun/awt/awt_LoadLibrary.c 9 Oct 2005 05:34:52 -0000
+@@ -195,8 +195,7 @@
+ }
+ }
+ else {
+-/* XXXBSD: decide which toolkit to use */
+-#if defined(__linux)
++#if defined(__linux) || defined(_ALLBSD_SOURCE)
+ /* Default AWT Toolkit on Linux is XAWT. */
+ strcpy(p, "/xawt/libmawt");
+ XAWT = 1;