<Swing Dev> <AWT Dev> [9] Review Request: 8074668 [macosx] Mac 10.10: Application run with splash screen has focus issues
Sergey Bylokhov
Sergey.Bylokhov at oracle.com
Thu Mar 12 01:46:55 UTC 2015
11.03.15 18:40, Sergey Bylokhov wrote:
> Hello.
> Please review the fix for jdk 8/9.
> Lots of issues(hangs or focus lost) occurred after we call
> NSScreen.backingScaleFactor on a Appkit Thread in time of splash
> screen initialization.
> This is a regression of two fixes:
> https://bugs.openjdk.java.net/browse/JDK-8043869
> https://bugs.openjdk.java.net/browse/JDK-8049198
> Current issue occures after the second fix.
>
> Bug: https://bugs.openjdk.java.net/browse/JDK-8074668
> As a fix I suggest to disable functionality which was added in
> JDK-8049198 <https://bugs.openjdk.java.net/browse/JDK-8049198> and
> JDK-8043869 <https://bugs.openjdk.java.net/browse/JDK-8043869>.
> Because if I try to revert them back I should change more files which
> I consider will be danger.
The fix which broke the splash screen:
http://hg.openjdk.java.net/jdk9/jdk9/jdk/rev/fb3f4212427f
Suggested fix:
src/macosx/native/sun/awt/splashscreen/splashscreen_sys.m
@@ -129,15 +129,11 @@
char* SplashGetScaledImageName(const char* jar, const char* file,
float *scaleFactor) {
NSAutoreleasePool *pool = [NSAutoreleasePool new];
*scaleFactor = 1;
char* scaledFile = nil;
- __block float screenScaleFactor = 1;
-
- [ThreadUtilities performOnMainThreadWaiting:YES block:^(){
- screenScaleFactor = [SplashNSScreen() backingScaleFactor];
- }];
+ float screenScaleFactor = 1;
if (screenScaleFactor > 1) {
NSString *fileName = [NSString stringWithUTF8String: file];
NSUInteger length = [fileName length];
NSRange range = [fileName rangeOfString: @"."
> --
> Best regards, Sergey.
--
Best regards, Sergey.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.openjdk.java.net/pipermail/swing-dev/attachments/20150311/3f1c59e6/attachment.html>
More information about the swing-dev
mailing list