HumbleUI / JWM

Cross-platform window management and OS integration library for Java
Apache License 2.0
571 stars 46 forks source link

macOS: main window shows inside fullscreen if started from fullscreen app #221

Open bumfo opened 2 years ago

bumfo commented 2 years ago

If you start the app from an full screen app, e.g. Intellij IDEA, then the main window is shown inside the fullscreen space, instead of shown in desktop space as normal.

The behavior is correct in 0.3.x, when using App.init() and App.start() separately.

bumfo commented 2 years ago

However, if a delay is added before setVisible(true) of the main window, everything works fine.

Edit: Below is a minimal workaround. Not sure why.

App.start(() -> {
    Window window = App.makeWindow();
    new Thread(() -> {
        App.runOnUIThread(() -> {
            window.setVisible(true);
        });
    }).start();
});
tonsky commented 2 years ago

Thanks for reporting!