6984039: awt source rebranding vendor changes needed (jdk7 only)
authorart
Tue, 09 Nov 2010 14:02:54 +0300
changeset 7151 8db734b13eb6
parent 7150 6c95b4f80a72
child 7152 0eeadc73e6ef
6984039: awt source rebranding vendor changes needed (jdk7 only) Reviewed-by: prr, ohair
jdk/src/solaris/native/sun/awt/awt_MToolkit.c
jdk/src/solaris/native/sun/awt/fontpath.c
jdk/src/solaris/native/sun/xawt/XWindow.c
--- a/jdk/src/solaris/native/sun/awt/awt_MToolkit.c	Mon Nov 08 18:02:15 2010 +0300
+++ b/jdk/src/solaris/native/sun/awt/awt_MToolkit.c	Tue Nov 09 14:02:54 2010 +0300
@@ -2773,11 +2773,6 @@
         }
     }
 
-    /*
-    scrollBugWorkAround =
-        (strcmp(XServerVendor(awt_display), "Sun Microsystems, Inc.") == 0
-         && XVendorRelease(awt_display) == 3400);
-    */
     scrollBugWorkAround = TRUE;
 
     /*
--- a/jdk/src/solaris/native/sun/awt/fontpath.c	Mon Nov 08 18:02:15 2010 +0300
+++ b/jdk/src/solaris/native/sun/awt/fontpath.c	Tue Nov 09 14:02:54 2010 +0300
@@ -557,7 +557,8 @@
 #ifndef HEADLESS
 static int isSunXServer() {
 #ifdef __solaris__
-  return (strcmp("Sun Microsystems, Inc.", ServerVendor(awt_display)) == 0 &&
+  return ((strncmp(ServerVendor(awt_display), "Sun Microsystems, Inc.", 22) == 0) ||
+          (strncmp(ServerVendor(awt_display), "Oracle Corporation", 18) == 0) &&
           VendorRelease(awt_display) >= 6410);
 #else
   return 0;
--- a/jdk/src/solaris/native/sun/xawt/XWindow.c	Mon Nov 08 18:02:15 2010 +0300
+++ b/jdk/src/solaris/native/sun/xawt/XWindow.c	Tue Nov 09 14:02:54 2010 +0300
@@ -766,7 +766,9 @@
 static Boolean
 isXsunServer(XEvent *event) {
     if( awt_ServerDetected ) return awt_IsXsun;
-    if( strncmp( ServerVendor( event->xkey.display ), "Sun Microsystems, Inc.", 32) ) {
+    if( (strncmp( ServerVendor( event->xkey.display ), "Sun Microsystems, Inc.", 22) != 0) &&
+        (strncmp( ServerVendor( event->xkey.display ), "Oracle Corporation", 18) != 0) )
+    {
         awt_ServerDetected = True;
         awt_IsXsun = False;
         return False;