On Tue, 27 Apr 2021 01:09:44 GMT, Sergey Bylokhov <[email protected]> wrote:
> The fix for the JDK-8187639 reimplemented the tray icon messages using the
> standard notification center, it worked fine on macOS 10.9. But on the new
> macOS, the usage of that API requests permission from the user. Since the
> code was added to the NSApplicationAWT this request is always shown even if
> the app does not use tray icons. This fix moves the code to the tray icon
> itself. I have tested this on macOS 11.2. It will be good if someone can
> check macOS 10.14 or macOS 10.15.
Please confirm if it is working in 10.14 and in multiscreen environment. Also,
I guess a testcase can be written to see if notification center is coming up
for normal awt non-trayicon app(obscuring normal awt window or not)
BTW, I see from
https://developer.apple.com/documentation/foundation/nsusernotificationcenter?language=objc
that this class is deprecated, so I think we should not use this way of
notifying user and find some other alternative or do away with this or else we
will get new problems like this in newer releases.
I think we should use
https://developer.apple.com/documentation/usernotifications?language=objc
"UNUserNotificationCenter" instead which is the favoured way since Mohave, it
seems.
-------------
PR: https://git.openjdk.java.net/jdk/pull/3707