You're not receiving a mouse event on the HeaderBar because when the
area under the cursor is classified as draggable, we can't send the
event to the application; it is consumed by the window manager.
There's no API to disable the double-click to maximize behavior for an
extended stage, much in the same way as there's no API to do that for
a decorated stage. Since an extended stage is just a decorated stage
with a customizable title bar, any solution to toggle the double-click
to maximize behavior should apply to both stage styles.

Maybe we can have an API like Stage.setMaximizable(boolean) to toggle
the maximizable capability (this would be different from the existing
Stage.setMaximized(boolean), which toggles a state, not a capability).
We should discuss this feature request in terms of both decorated and
extended stage styles.


On Wed, May 6, 2026 at 9:59 PM PavelTurk <[email protected]> wrote:
>
> Hello,
>
> I'm using StageStyle.EXTENDED together with the new HeaderBar. Could
> anyone say if there is a way to disable window maximizing when the user
> double-clicks on the header area? I need it for a custom dialog window —
> it should be resizable, but without maximize support (there is no
> maximize button, and the window should not be maximized on double-click).
>
> I tried the following:
>
> headerBar.addEventFilter(MouseEvent.MOUSE_CLICKED, e -> {
>      if (e.getClickCount() == 2) {
>          e.consume();
>      }
> });
>
> But it didn't work because the filter is never called.
>
>
> Best regards, Pavel

Reply via email to