slint-ui / slint

Slint is a declarative GUI toolkit to build native user interfaces for Rust, C++, or JavaScript apps.
https://slint.dev
Other
15.92k stars 524 forks source link

When opening multiple windows on Wayland/Winit, it's not possible to close them separately #5443

Closed danutsu closed 1 week ago

danutsu commented 1 week ago

Repro: Start with the Slint Rust template. Ensure you are using Winit as a backend and Skia as a renderer.

Add a slint! block with a trivial second component (Just a Text). Show both of them at once using:

ui1.show();
ui2.show();
slint::run_event_loop();

Run the program. Attempt to close one of the windows by clicking the "X" button in the window decoration.

Expected: Based on behavior when running on X11, I think the window is supposed to close, even if the other window is still open.

Actual: The window does not close but becomes unresponsive. After clicking "X" on the second window's decoration both windows close and the call to run_event_loop() returns.

ogoffart commented 1 week ago

Thanks for filling an issue.

This is a known problem with Wayland and winit: https://github.com/slint-ui/slint/issues/4225 We'll be hopefully get that fixe din the next release Closing this issue as a duplicate, but thanks anyway for reporting.