slint icon indicating copy to clipboard operation
slint copied to clipboard

VS code extension live-preview does not bring window into foreground

Open tronical opened this issue 4 years ago • 7 comments

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.

tronical avatar Apr 14 '21 11:04 tronical

Can be reproduced on X11 as well

ogoffart avatar Apr 14 '21 11:04 ogoffart

The next winit release with rust-windowing/winit#1944 might allow us to fix this.

tronical avatar May 22 '21 07:05 tronical

It seems that while the winit change was merged, it didn't make it into 0.24, but should be in 0.25 then.

tronical avatar Jul 12 '21 12:07 tronical

We ideally we would have some "raise window" functionality for this to work.

hunger avatar Jan 19 '24 10:01 hunger

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

ogoffart avatar Jan 19 '24 10:01 ogoffart

Ideally the window should be brought back to the top each time the user click on "Show Preview"

ogoffart avatar Jan 19 '24 10:01 ogoffart

This bug also happens under Windows.

Enyium avatar Aug 22 '24 14:08 Enyium

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 :-)

tronical avatar Sep 24 '24 15:09 tronical