-
Notifications
You must be signed in to change notification settings - Fork 552
8348744: Application window not always activated on macOS 15 #1685
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -283,11 +283,8 @@ - (void)applicationDidFinishLaunching:(NSNotification *)aNotification | |
| // but it doesn't get activated, so this is needed: | ||
| LOG("-> need to active application"); | ||
| dispatch_async(dispatch_get_main_queue(), ^{ | ||
| [NSApp performSelector: @selector(activate)]; | ||
| [NSApp activateIgnoringOtherApps:YES]; | ||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I see that the CanvasTest mentioned in the JBS issue passes now with this fix, and fails with I'm not sure why
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @jperedadnr can you add this comment to https://bugs.openjdk.org/browse/JDK-8348878 please?
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Done
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
The default activation mode is to only activate only when no other app is active, after first deactivating the launching application. This is true for the new The
Let's continue looking into this in the context of JDK-8348878. |
||
| }); | ||
| // TODO: performSelector is used only to avoid a compiler | ||
| // warning with the 13.3 SDK. After updating to SDK 14 | ||
| // this can be converted to a standard call. | ||
| } | ||
| } | ||
|
|
||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
should we add a comment about possible removal of this API in newer platforms?
(I would suggest also include the JBS reference so the context can be obtained by the person who will be fixing this code in the future).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't want to do either of these in this PR. My comment in the PR Description about possible API removal is independent of this bug and something I just happened to notice -- plus it's speculative on my part. I will file a follow-on place-holder bug for this, but there isn't anything actionable at this point. Also, I don't like the practice of putting bug IDs in for fixed bugs except in unusual cases (this isn't one of them).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I filed JDK-8348878 to track our use of the deprecated
[NSApp activateIgnoringOtherApps]method.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, one can typically rely on git history to make connection to the original PR/JBS. The problem is that a merge might make this information not (easily) accessible.
And yes, the comments are subject to the usual decay, when they lose the relevance (or stop being applicable), but at least one can easily find the original issue and related discussion.
Just my two yen.