Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 09 Oct 2005 13:00:23 +0800
From:      Huang wen hui <hwh@gddsn.org.cn>
To:        Greg Lewis <glewis@eyesbeyond.com>
Cc:        java <java@FreeBSD.org>, Panagiotis Astithas <past@ebs.gr>
Subject:   Re: jdk15 and window manager
Message-ID:  <4348A3E7.3020901@gddsn.org.cn>
In-Reply-To: <20051009042244.GA14786@misty.eyesbeyond.com>
References:  <43469160.4050303@gddsn.org.cn> <4347447F.2010801@gddsn.org.cn> <43480784.3060400@ebs.gr> <20051009042244.GA14786@misty.eyesbeyond.com>

next in thread | previous in thread | raw e-mail | index | archive | help
Greg Lewis дµÀ:

>On Sat, Oct 08, 2005 at 08:53:08PM +0300, Panagiotis Astithas wrote:
>  
>
>>Huang wen hui wrote:
>>    
>>
>>>OK, using Option "-Dawt.toolkit=sun.awt.X11.XToolkit" really help that:)
>>>We should use X11 Toolkit by default.
>>>      
>>>
>>I guess so:
>>
>>http://java.sun.com/j2se/1.5.0/docs/guide/awt/1.5/xawt.html
>>    
>>
>
>You could try the attached patch (currently untested, but looks reasonable).
>
>  
>
>------------------------------------------------------------------------
>
>$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);
>  
>
Need more a patch:

--- ../../j2se/src/solaris/native/sun/awt/awt_LoadLibrary.c.orig Sun Oct
9 12:31:14 2005
+++ ../../j2se/src/solaris/native/sun/awt/awt_LoadLibrary.c Sun Oct 9
12:34:47 2005
@@ -195,8 +195,7 @@
}
}
else {
-/* XXXBSD: decide which toolkit to use */
-#if defined(__linux)
+#if defined(__linux) || defined(__FreeBSD__)
/* Default AWT Toolkit on Linux is XAWT. */
strcpy(p, "/xawt/libmawt");
XAWT = 1;


--hwh




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?4348A3E7.3020901>