OS/X GUI applications
Michael Hall
mik3hall at gmail.com
Fri Dec 30 01:34:48 UTC 2022
> On Dec 28, 2022, at 9:51 PM, Michael Hall <mik3hall at gmail.com> wrote:
>
> Mail.app not receiving for some reason. So from gmail in Safari.
>
> >The Apple system properties are going to remain as they are, unless e.g. there's some good reason to change the key of a property.
>
> OK, good to know. I'm pretty sure -Dapple.laf.useScreenMenuBar=true was made the OS/X application default. I thought some of the other old property functionality had been incorporated in some way or other but might be mistaken.
>
> >Afaik setAboutHandler is the only way to set such a callback.
>
> There seems to be some other way because I don't find anywhere I use this. I eliminated all Apple system properties but still get an About... It seems you are correct that eliminating the about.name <http://about.name/> appears to have no impact. Eliminating -Dapple.awt.application.name <http://dapple.awt.application.name/>=HalfPipe and the About menu item no longer shows the application name but rather the unpackaged main class name. The About window is still correct. It includes the application icon, the application name (valid) in bold. Also, Version and Copyright it appears to get from the application Info.plist. Rather a nice default. I could post a screen shot somewhere? Possibly something has been cached for the app by Apple from some time ago? Or I still need to figure out where this comes from.
>
> >Ask the JavaFX mailing list for supporting an About handler if they don't already have it; I believe their mailing list is openjfx-dev at openjdk.org <mailto:openjfx-dev at openjdk.org>
>
> OK, this part of the support would be split. Thanks.
>
Fwiw, I did a little more looking at this.
It seems this…
_AppEventHandler
openCocoaAboutWindow(); // if the handler is null, fall back to showing the Cocoa default
Is what gets the default window that I am seeing.
It would then almost seem like a javaFX application could do something like…
static {
java.awt.Desktop.getDesktop().setAboutHandler(null);
}
Might work but it doesn’t.
You can’t compile directly against com.apple.eawt anymore…
JDK-8160437 : com.apple.eawt.Application is not exported
So I don;t know if that could work-around.
I might wonder if it would be easier for the jdk side to get the Desktop invocation to work rather than javaFX rework all that Apple and the jdk already has done from scratch?
But currently there appears to be no way to include this functionality for a javaFX app.
Although, I haven’t asked on the javaFX list. Maybe they already figured all this out
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mail.openjdk.org/pipermail/client-libs-dev/attachments/20221229/a0e30808/attachment.htm>
More information about the client-libs-dev
mailing list