United StatesChange Country, Oracle Worldwide Web Sites Communities I am a... I want to...
Bug ID: JDK-7142120 [macosx] Some JCK tests for SplashScreen fail on Mac OS X due to incorrect positioning of the splash
JDK-7142120 : [macosx] Some JCK tests for SplashScreen fail on Mac OS X due to incorrect positioning of the splash

Details
Type:
Bug
Submit Date:
2012-02-02
Status:
Closed
Updated Date:
2013-11-28
Project Name:
JDK
Resolved Date:
2012-03-19
Component:
client-libs
OS:
generic
Sub-Component:
java.awt
CPU:
generic
Priority:
P2
Resolution:
Fixed
Affected Versions:
7
Fixed Versions:
7u4 (b13)

Related Reports
Relates:

Sub Tasks

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
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;
                                     
2012-02-03
EVALUATION

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

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

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



Hardware and Software, Engineered to Work Together