Open Tiagoquix opened 4 months ago
I'm afraid we cannot add a second identical WM_CLASS to the database. It already belongs to Half-Life 2. That would cause problems if we had installed Half-Life 2 and Team Fortress 2 together, as the desktop manager wouldn't know which one of these two .desktop files to use (since WM_CLASS should be unique to properly link running instances and their .desktop files).
To actually fix and close #37 and #41 we need to figure out why the fix-wm-class.sh script is not finding windows correctly in your case and therefore not exiting itself and hanging Steam in running state as well.
Can you please try to follow these steps and report your observations?
~/.local/share/applications/steam-icons-fixed/Team-Fortress-2.desktop
exists and contains StartupWMClass=Team Fortress 2 - OpenGL
line.xdotool search --sync --name "Team Fortress 2 - OpenGL" set_window --classname "Team Fortress 2 - OpenGL" --class "Team Fortress 2 - OpenGL" %@
and watch if it exits and fixes the icon.Hello there. The xdotool
command you provided does nothing.
I've also tried to replaced the Team Fortress 2 - OpenGL
with hl2_linux
for the last two ones (since they require the WM_CLASS
attribute) but it didn't work.
Also, the script doesn't continue and gets stuck on the terminal.
By the way, previously, when adding a second hl2_linux
to the databases file, the script would not be able to add the launch options automatically. So, yeah, it's not desirable to do it.
The xdotool command you provided does nothing. Also, the script doesn't continue and gets stuck on the terminal
This is weird. It means it cannot find a window with name "Team Fortress 2 - OpenGL". But it should. At least it does in my case. Can you share xprop
output after clicking on the Team Fortress 2 window?
To explain to you what this xdotool
command does (and the fix-wm-class.sh script):
WM_CLASS
or multiple windows have the same WM_CLASS
(like this hl2_linux
- Half-Life 2, Team Fortress 2, Portal 2 and other games share the same), we need to manually set/change this wrong WM_CLASS
to something else.WM_NAME
to find the correct window (first part of the command: xdotool search --sync --name "Team Fortress 2 - OpenGL"
) and set the WM_CLASS
(it has two parts - classname and class) to whatever we want (second part of the command: ... set_window --classname "Team Fortress 2 - OpenGL" --class "Team Fortress 2 - OpenGL" %@
)By the way, previously, when adding a second hl2_linux to the databases file, the script would not be able to add the launch options automatically. So, yeah, it's not desirable to do it.
Also to clarify, we add launch options only if there is something wrong with the game's WM_CLASS. That means if it is missing or is not unique.
Hello. Thanks for the explanation.
Here's the xprop
output: https://0.jaegers.net/?1f63abf0c0e6a13f#5sHwrYSC6vc8AsRuLa8f2hh6AgPJ3E6XgovetNEeZaGJ
This closes #37.