6984039: awt source rebranding vendor changes needed (jdk7 only)

Reviewed-by: prr, ohair
This commit is contained in:
Artem Ananiev 2010-11-09 14:02:54 +03:00
parent 28dedbec71
commit 4c592b0ab5
3 changed files with 5 additions and 7 deletions

View File

@ -2773,11 +2773,6 @@ Java_sun_awt_motif_MToolkit_init(JNIEnv *env, jobject this,
}
}
/*
scrollBugWorkAround =
(strcmp(XServerVendor(awt_display), "Sun Microsystems, Inc.") == 0
&& XVendorRelease(awt_display) == 3400);
*/
scrollBugWorkAround = TRUE;
/*

View File

@ -557,7 +557,8 @@ JNIEXPORT jstring JNICALL Java_sun_awt_X11FontManager_getFontPath
#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;

View File

@ -766,7 +766,9 @@ adjustKeySym(XEvent *event, KeySym *keysym)
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;