slint
slint copied to clipboard
VS code extension live-preview does not bring window into foreground
When initialing the "Show Preview" command, the live-preview windows is not brought to the foreground. If the VS code window is occupying the full screen, the window appears obscured behind the VS code window and needs to be brought into the foreground manually.
If it's not possible to bring it to the foreground, then alternatively it would be nice if the corresponding icon in the dock could "bounce" or otherwise indicate its availability to the user. Otherwise it appears that "Show Preview" does not do anything.
Can be reproduced on X11 as well
The next winit release with rust-windowing/winit#1944 might allow us to fix this.
It seems that while the winit change was merged, it didn't make it into 0.24, but should be in 0.25 then.
We ideally we would have some "raise window" functionality for this to work.
Now that winit has focus_window, we could implement that. We would need to expose the focus_window API to Slint's Window rust/c++/... API and use that. https://github.com/slint-ui/slint/issues/4382
Ideally the window should be brought back to the top each time the user click on "Show Preview"
This bug also happens under Windows.
Note that it seems that this can't be fixed with wayland, as there's no such functionality in the protocol. But if anyone has ideas what kind of workarounds we could apply, please comment :-)