Double title bar
See original GitHub issueWhen we use FlatLaf.setUseNativeWindowDecorations(FlatLaf.supportsNativeWindowDecorations());
, sometimes we got two title bars (one from system and one from FlatLaf). Also when this error occurs, buttons on title bar don`t work as expected - no action after click.
The bug occurs in a non-deterministic way, so a test application has been created to reproduce it - double-title-bar-app.zip
Gif included from test app
FlatLaf version: 1.1.2 Java Version: 11 OS: Windows 10 Pro
import com.formdev.flatlaf.FlatIntelliJLaf;
import com.formdev.flatlaf.FlatLaf;
import javax.swing.*;
import java.awt.*;
import java.lang.reflect.InvocationTargetException;
public class FrameCreator {
private static int size = 200;
public static void initLAF() throws UnsupportedLookAndFeelException {
UIManager.setLookAndFeel(new FlatIntelliJLaf());
FlatLaf.setUseNativeWindowDecorations(FlatLaf.supportsNativeWindowDecorations());
UIManager.put("TitlePane.unifiedBackground", true);
}
public static void main(String[] args) throws InvocationTargetException, InterruptedException {
SwingUtilities.invokeAndWait(() -> {
try {
initLAF();
} catch (UnsupportedLookAndFeelException e) {
e.printStackTrace();
}
});
Dimension screenSize = Toolkit.getDefaultToolkit().getScreenSize();
double width = screenSize.getWidth();
double height = screenSize.getHeight();
for (int i = 0; i < width / size; i++) {
for (int j = 0; j < height / size; j++) {
showFrame(i,j);
}
}
}
public static void showFrame(int i, int j) {
SwingUtilities.invokeLater(() -> {
JFrame frame = new JFrame();
frame.setDefaultCloseOperation(WindowConstants.EXIT_ON_CLOSE);
frame.setSize(size - 10, size - 10);
frame.setLocation(i * size + 10, j * size + 10);
frame.setVisible(true);
});
}
}
Issue Analytics
- State:
- Created 2 years ago
- Reactions:5
- Comments:6
Top Results From Across the Web
Double title bars/ Two title bars appear in Ubuntu 20.04
Double title bars / Two title bars appear in Ubuntu 20.04 ... This is another demonstration of why mixing desktop environments is not...
Read more >Double title bar in macOS · Issue #2968 - GitHub
Describe the bug Very minor issue, but in macOS the title bar is doubled, losing a small bit of vertical screen estate, and...
Read more >Ubuntu Budgie - Terminal has double title bars
I'm running Ubuntu 19.04 with the Budgie UI installed on it. My Gnome terminal windows have two title bars sometimes.
Read more >double title bar with floating window | WPF Forums - Syncfusion
I've noticed with the most recent version that if I Float any of my docked windows that there is a double title bar....
Read more >XFCE 4.16 dialog double title bars with gtk3-classic
I'm using it with gtk3-classic and it works well to restore the classic XFCE window appearance. One more little advantage of using Manjaro!...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
@DevCharly I confirm that fix works. Can you backport it to release version?
FlatLaf 1.2 is now available. Sorry for the delay…