JFormDesigner / FlatLaf

FlatLaf - Swing Look and Feel (with Darcula/IntelliJ themes support)
https://www.formdev.com/flatlaf/
Apache License 2.0
3.45k stars 274 forks source link

Double-click on icon closes window doesn't seem to be through calls `com.formdev.flatlaf.ui.FlatTitlePane.Handler#mouseClicked` ? #470

Closed 823984418 closed 2 years ago

823984418 commented 2 years ago

Double-click on icon closes window doesn't seem to be through calls com.formdev.flatlaf.ui.FlatTitlePane.Handler#mouseClicked ? The breakpoint did not hit the method, TimedWindowEvent(id=WINDOW_CLOSING) is directly constructed.

<init>:48, TimedWindowEvent (sun.awt)
eventLoop:-1, WToolkit (sun.awt.windows)
run:305, WToolkit (sun.awt.windows)
run:834, Thread (java.lang)
DevCharly commented 2 years ago

That's true. That code is no longer used since the introduction of the native window decorations where this is handled by Windows.

It is used if FlatLaf native window decorations are disabled and custom decorations are enabled (not recommended):

System.setProperty( "flatlaf.useWindowDecorations", "false" );
JFrame.setDefaultLookAndFeelDecorated( true );