slint-ui / slint

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

Initial window content not rendered in window - WSL2 #5028

Closed vdave007 closed 5 months ago

vdave007 commented 5 months ago

Using the https://github.com/slint-ui/slint-rust-template to create an app on WSL2, after starting up, the initial screen is not rendered inside the window but outside.

image

Trying to interact with the content, is unsuccessful, in the example's case. Pressing the button doesn't work, and pressing inside the window just passes through. The issue is solved when the window is moved or switching to other window and back, or just simply clicking on the window header.

Tested it on 2 different machine, and it reproduced on both, every time. Not sure if this is a Slint issue or a WSL2 one.

hunger commented 5 months ago

Do you have DISPLAY or WAYLAND_DISPLAY set in your WSL environment? Or does WSL even support wayland nowadays?

I am wondering as I had seen similar effects using wayland on Linux with Slint < 1.5.0.

tronical commented 5 months ago

Duplicate of #4584