JDK-7142120 : [macosx] Some JCK tests for SplashScreen fail on Mac OS X due to incorrect positioning of the splash
  • Type: Bug
  • Component: client-libs
  • Sub-Component: java.awt
  • Affected Version: 7
  • Priority: P2
  • Status: Closed
  • Resolution: Fixed
  • OS: generic
  • CPU: generic
  • Submitted: 2012-02-02
  • Updated: 2013-11-28
  • Resolved: 2012-03-19
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
JDK 7
7u4 b13Fixed
Description
12 JCK tests fail on Mac OS X with b227. Most of the failures are due to incorrect positioning of the splash screen: it is shifted 24 pixels lowere than expected by the JCK test. This is because OS accounts for the main menu bar and relocates the window automatically.

Note that there's a number of other failures related to wrong colors when checking the image of the splash screen, but those will need to be fixed separately after fixing the positioning issue.

Comments
EVALUATION 8-na: the fix is integrated as a part of 7113349.
23-03-2012

EVALUATION The suggested fix resolves the issue: all the tests pass.
03-02-2012

SUGGESTED FIX --- old/src/macosx/native/sun/awt/splashscreen/splashscreen_sys.m 2012-02-03 17:12:38.000000000 +0400 +++ new/src/macosx/native/sun/awt/splashscreen/splashscreen_sys.m 2012-02-03 17:12:37.000000000 +0400 @@ -48,7 +48,7 @@ static void SplashCenter(Splash * splash) { // otherwise could use screens[0] to select the menu-bar screen - NSRect screenFrame = [[NSScreen mainScreen] visibleFrame]; + NSRect screenFrame = [[NSScreen mainScreen] frame]; splash->x = (screenFrame.size.width - splash->width) / 2; splash->y = (screenFrame.size.height - splash->height) / 2 + screenFrame.origin.y;
03-02-2012

EVALUATION The splash screen window needs to be located at the center of the screen.
02-02-2012