8027912: [macosx] Provide means to force the headful mode on OS X when running via ssh
authoranthony
Fri, 08 Nov 2013 20:07:35 +0400
changeset 21536 032532f158ae
parent 21535 aac40f500833
child 21537 6815fa4c5500
8027912: [macosx] Provide means to force the headful mode on OS X when running via ssh Summary: Bypass AquaSession check if AWT_FORCE_HEADFUL env. variable is set to TRUE Reviewed-by: anthony, art Contributed-by: David Dehaven <david.dehaven@oracle.com>
jdk/src/solaris/native/java/lang/java_props_macosx.c
--- a/jdk/src/solaris/native/java/lang/java_props_macosx.c	Thu Nov 07 14:06:07 2013 +0100
+++ b/jdk/src/solaris/native/java/lang/java_props_macosx.c	Fri Nov 08 20:07:35 2013 +0400
@@ -106,6 +106,12 @@
 }
 
 int isInAquaSession() {
+    // environment variable to bypass the aqua session check
+    char *ev = getenv("AWT_FORCE_HEADFUL");
+    if (ev && (strncasecmp(ev, "true", 4) == 0)) {
+        // if "true" then tell the caller we're in an Aqua session without actually checking
+        return 1;
+    }
     // Is the WindowServer available?
     SecuritySessionId session_id;
     SessionAttributeBits session_info;