godotengine / godot

Godot Engine – Multi-platform 2D and 3D game engine
https://godotengine.org
MIT License
90.87k stars 21.14k forks source link

VSCode with Godot Tools stops displaying pop-up information on classes and functions [Wayland/Sway] #96942

Open comminux opened 1 month ago

comminux commented 1 month ago

Tested versions

System information

Arch Linux #1 SMP PREEMPT_DYNAMIC Tue, 10 Sep 2024 14:57:31 +0000 - Wayland - Vulkan (Mobile) - integrated Intel(R) UHD Graphics (TGL GT2) - 11th Gen Intel(R) Core(TM) i3-1115G4 @ 3.00GHz (4 Threads)

Issue description

If the option to prefer Wayland is enabled in the editor settings and Godot Editor is placed in a different workspace of the Sway tiling window manager, Visual Studio Code with Godot Tools extension stops displaying pop-up information on classes and functions. This issue could not be reproduced in Gnome on Wayland.

Steps to reproduce

Enable run/platforms/linuxbsd/prefer_wayland and after restart move the editor to another workspace.

2024-09-08_22-09-1725825411

Minimal reproduction project (MRP)

None

HolonProduction commented 1 month ago

Are you talking about the Git Plugin (which is for the godot editor) or the VSCode Plugin?

comminux commented 1 month ago

Yes, I apologize for the mistake.

This issue does not occur if inactive Godot Editor window is open in the same workspace as VSCode.

I checked Sway 1.9 + wlroots0.17, as well as git versions of these packages.

It is possible that this issue is specific to Sway/wlroots https://www.reddit.com/r/swaywm/comments/180sqtv/gamescope_freezes_on_inactive_workspace/?rdt=41482

comminux commented 1 month ago

I used the print-fps function and found that when the editor is on another workspace, the Editor FPS information is not updated.

@Riteo What do you think?

Riteo commented 1 month ago

@comminux the probable culprit is the window suspension code. Sway at the moment doesn't yet report when the window is hidden, unlike e.g. kwin, which means that we have to do a lot more guesswork.

I just gave a look and... I think I know what I guessed wrong lol. Stay tuned for a tentative patch.

akien-mga commented 1 month ago

There's a PR which might solve this:

Could you test it and confirm?

comminux commented 1 month ago

I confirm that the build of Godot from artifact in wayland mode in Sway allows you to work with VS Code in separate workspaces.

--print-fps when Godot is on another workspace:

Editor FPS: 10 (100.00 mspf)
Editor FPS: 10 (100.00 mspf)
Editor FPS: 10 (100.00 mspf)