changeset 5024:d75496a7c71b

7144542: [macosx] Crash in liblwawt.dylib setBusy() when exiting an FX app Summary: Use XToolkit instead of CToolkit in headless mode Reviewed-by: art
author anthony
date Mon, 21 May 2012 18:35:41 +0400
parents e3478500d252
children 7498514309e3
files src/solaris/native/sun/awt/awt_LoadLibrary.c
diffstat 1 files changed, 1 insertions(+), 5 deletions(-) [+]
line wrap: on
line diff
--- a/src/solaris/native/sun/awt/awt_LoadLibrary.c	Fri May 18 15:15:38 2012 -0700
+++ b/src/solaris/native/sun/awt/awt_LoadLibrary.c	Mon May 21 18:35:41 2012 +0400
@@ -110,7 +110,7 @@
     /* Check if toolkit is specified in env variable */
 #ifdef MACOSX
     envvar = getenv("AWT_TOOLKIT");
-    if (envvar && strstr(envvar, "XToolkit")) {
+    if ((envvar && strstr(envvar, "XToolkit")) || AWTIsHeadless()) {
 #endif
         fmanager = (*env)->NewStringUTF(env, "sun.awt.X11FontManager");
         tk = "/xawt/libmawt";
@@ -127,15 +127,11 @@
     }
 
     /* Calculate library name to load */
-#ifndef MACOSX
     if (AWTIsHeadless()) {
         strcpy(p, "/headless/libmawt");
     } else if (tk) {
-#endif
         strcpy(p, tk);
-#ifndef MACOSX
     }
-#endif
 
 #ifdef MACOSX
     strcat(p, ".dylib");