Right-click system menu: I think it should work rather well: on any platform, setting the context menu on the header works as expected (the FX menu appears), and on Windows, when the app does not set the context menu, the system menu appears as expected, unless the app sets its own (the first case).
for the rest of the questions - I agree, we need to know what the wider community thinks. And thanks for the bind() - I forgot about unbind(), my bad. Thanks, -andy From: openjfx-dev <openjfx-dev-r...@openjdk.org> on behalf of Michael Strauß <michaelstr...@gmail.com> Date: Friday, October 25, 2024 at 10:47 To: Cc: openjfx-dev <openjfx-dev@openjdk.org> Subject: Re: JEP: JavaFX controls in the title bar > - Right-click system menu: you are right, we probably should not add an API > to control the system menu. However, it might make sense to have the > HeaderBar show the system menu on Windows by default, unless the > onContextMenuRequestedProperty is set. What do you think? Shouldn't the > HeaderBar mimic the native behavior? Good question. Should an application have the option to disable the system menu if it doesn't want it? In that case, how would that work with the context menu API? > - HeaderBar height: so you explicitly do not want USE_NATIVE_HEIGHT = -5.0; > constant (or something like that)? This sounds pretty intrusive. At the very least, this would require implementations of HeaderBarBase to know how to deal with a new minWidth constant. I'm not opposed to it in general, just wondering whether it's the right move... > But generally speaking, I think the method to achieve the same height as the > native title bar should be described both in the JEP and the docs. Ok, this can be done once we know how to proceed. > Also, and I might be wrong here - would this code stop working after the > binding gets collected, unless you keep the reference to the created double > binding: bind() will keep a strong reference to the ObservableValue you pass into it.