godotengine / godot

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

Applications made with Godot are grouped with the Godot editor in KDE's task manager #81141

Open poperigby opened 1 year ago

poperigby commented 1 year ago

Godot version

v4.1.1.stable.flathub [bd6af8e0e]

System information

Godot v4.1.1.stable (bd6af8e0e) - Freedesktop SDK 22.08 (Flatpak runtime) - Vulkan (Forward+) - dedicated AMD Radeon RX 5700 XT (RADV NAVI10) () - AMD Ryzen 7 3700X 8-Core Processor (16 Threads)

Issue description

Any application that is made with Godot (i.e. Pixelorama) is grouped under the Godot icon along with it's editor, in the Icons-only Task Manager.

I opened a bug report for this on KDE's bug tracker, but I was told that this was actually a problem with Godot:

This would be happening because those apps are incorrectly setting their metadata (WM_CLASS, WM_STRING, etc) to be the same metadata that Godot Engine uses. I'd recommend reporting the issue to the developers of those apps. The Godot people might want to hear about it too; if this is common, it might suggest that the template that new apps use is pre-set to what's used by Godot itself, which, if true, isn't a great default value.

Observed result

All applications that are made with Godot are grouped under the Godot editor.

Expected result

Applications made with Godot are in their own group, and not grouped under the Godot editor

Steps to reproduce

  1. Install the Godot editor (doesn't matter from where, distro packages or Flatpak)
  2. Install an application made with Godot (i.e. Pixelorama)
  3. Launch the Godot editor
  4. Launch any application made with Godot

Minimal reproduction project

N/A

bruvzg commented 1 year ago

Can't reproduce with 4.x, but it seems to be the case with 3.x (3.x apps also bundle with 4.x editor, but 4.x apps do not). Probably caused by hardcoded hints in the OpenGL context, and order of OS::set_context calls. 4.x update hints on both window creation and set_context.

bruvzg commented 1 year ago

In might be KDE bug as well, seems like it apply grouping only based on the first hints set, and do not change it if hints are changed. So if you start Pixelorama first and the editor second, it won't group it.

Starting Pixelorama first:

Starting Godot Editor first:

poperigby commented 1 year ago

Can't reproduce with 4.x, but it seems to be the case with 3.x (3.x apps also bundle with 4.x editor, but 4.x apps do not)

I'm using the 4.1.1 editor, and Pixelorama is a 4.x app.

In might be KDE bug as well, seems like it apply grouping only based on the first hints set, and do not change it if hints are changed. So if you start Pixelorama first and the editor second, it won't group it.

Yes, I can reproduce it not grouping if I start Pixelorama first.

I also forgot to mention that I'm using Wayland, so will your PR work for Wayland too?

I'll update the KDE bug report with this information.

bruvzg commented 1 year ago

and Pixelorama is a 4.x app

It seems to be 3.5.2 app (at least GitHub releases).

I also forgot to mention that I'm using Wayland, so will your PR work for Wayland too?

Currently, Godot is X11 only, so it's running via XWayland and should work the same on both Wayland and X11.

poperigby commented 1 year ago

It seems to be 3.5.2 app (at least GitHub releases).

Ahh, so maybe it will be fixed once they release a new version.

Currently, Godot is X11 only, so it's running via XWayland and should work the same on both Wayland and X11.

Right you are. I totally new that, so I don't know why I said that haha.

poperigby commented 1 year ago

Here's what a KDE maintainer said:

Sort of. We do indeed not support changing window hints at runtime. We could, but we currently consider this to be an app bug. To expand on that, the reason why we don't support window changing their hints at runtime is because it would cause windows to change their groupings at runtime, which would be extremely odd-looking and break your short-term muscle memory.

Zireael07 commented 1 year ago

Pixelorama is a 3.x app for now. Update to 4.x is in the works, but not done yet

akien-mga commented 1 year ago

I don't think this is fixed yet in 3.x? The PR hasn't been merged yet.