File tree Expand file tree Collapse file tree
flatlaf-core/src/main/java/com/formdev/flatlaf
flatlaf-demo/src/main/java/com/formdev/flatlaf/demo Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -16,6 +16,12 @@ FlatLaf Change Log
1616- Linux with JetBrains Runtime: Fixed mouse "jumping" to other position when
1717 moving window on scaled secondary screen, if using FlatLaf window decorations.
1818 (issue #1103 )
19+ - Linux with OpenJDK Project Wakefield (e.g. JetBrains JBR 25) and VM option
20+ ` -Dawt.toolkit.name=WLToolkit ` (issue #1107 ):
21+ - Disabled FlatLaf window decorations because of bug
22+ [ JBR-10322] ( https://youtrack.jetbrains.com/issue/JBR-10322 ) .
23+ - Disabled System File Chooser because application hangs after closing it.
24+ Uses ` JFileChooser ` instead.
1925- TableHeader: Fixed custom table header renderer background stops painting
2026 after hover interactions. (issue #1089 )
2127- TextComponents: Fixed preferred width when leading/trailing components or
Original file line number Diff line number Diff line change @@ -245,6 +245,14 @@ public boolean getSupportsWindowDecorations() {
245245 FlatNativeWindowBorder .isSupported () )
246246 return false ;
247247
248+ // Disable FlatLaf window decorations on Linux if using Wayland toolkit
249+ // because moving window does not work because of bug:
250+ // https://youtrack.jetbrains.com/issue/JBR-10322
251+ // Note: This affects only Java distributions that support Wayland toolkit
252+ // (e.g. JetBrains JBR) and have enabled it with VM option: -Dawt.toolkit.name=WLToolkit
253+ if ( SystemInfo .isLinux && Toolkit .getDefaultToolkit ().getClass ().getName ().endsWith ( ".WLToolkit" ) )
254+ return false ;
255+
248256 return SystemInfo .isWindows_10_orLater || SystemInfo .isLinux ;
249257 }
250258
Original file line number Diff line number Diff line change @@ -785,7 +785,9 @@ private FileChooserProvider getProvider() {
785785 return new WindowsFileChooserProvider ();
786786 else if ( SystemInfo .isMacOS && FlatNativeMacLibrary .isLoaded () )
787787 return new MacFileChooserProvider ();
788- else if ( SystemInfo .isLinux && FlatNativeLinuxLibrary .isLoaded () && FlatNativeLinuxLibrary .isGtk3Available () )
788+ else if ( SystemInfo .isLinux && FlatNativeLinuxLibrary .isLoaded () &&
789+ FlatNativeLinuxLibrary .isGtk3Available () &&
790+ !Toolkit .getDefaultToolkit ().getClass ().getName ().endsWith ( ".WLToolkit" ) )
789791 return new LinuxFileChooserProvider ();
790792 else // unknown platform or FlatLaf native library not loaded
791793 return new SwingFileChooserProvider ();
Original file line number Diff line number Diff line change @@ -632,7 +632,8 @@ private void initFullWindowContent() {
632632 }
633633
634634 private boolean supportsFlatLafWindowDecorations () {
635- return FlatLaf .supportsNativeWindowDecorations () || SystemInfo .isLinux ;
635+ return FlatLaf .supportsNativeWindowDecorations () ||
636+ (SystemInfo .isLinux && new FlatLightLaf ().getSupportsWindowDecorations ());
636637 }
637638
638639 private void initComponents () {
You can’t perform that action at this time.
0 commit comments