slint-ui / slint

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

Showing two windows at once on Winit/Skia on Wayland/GNOME causes one to be incorrectly painted initially #5442

Open danutsu opened 5 months ago

danutsu commented 5 months 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();

Screenshot from 2024-06-18 14-34-28

Expected: the two windows show up properly.

Actual: at least one of the windows shows up incorrectly painted. Exactly what the outcome is varies from attempt to attempt and seems to depend on the position of other windows on the desktop (I believe Gnome's Mutter compositor chooses where to display the windows based on that).

Note that touching the windows (resize or move) fixes the paint issues and they seem to work fine afterwards.

Platform: Debian Stable 12, GNOME 43.9, Rust

ogoffart commented 2 months ago

I believe this is a duplicate of https://github.com/slint-ui/slint/issues/4584