-
Notifications
You must be signed in to change notification settings - Fork 63
sdl_glimp: set APPID
as WMCLASS
on Linux
#1702
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
To get the icon properly displayed we need to update the desktop file installed by the updater, but this is enough to make the game name properly displayed. |
I also added the |
I wondered which desktops do this. Apparently GNOME is one. |
3960a72
to
952ac85
Compare
Our problem is that the desktop file is starting the It would be good to find a similar mechanism to implement in the updater too. On my end GNOME fails to associate the Unvanquished launcher icon with both the updater window and the engine windows. |
Why is this a problem? According to the SO link, GNOME doesn't know or care which desktop file was used to launch the program. The updater desktop file already uses the name "Unvanquished" and the standard Unvanquished icon. Supposing we associate the updater's desktop file with both applications, the only nicety we would lack is the updater would use the standard icon rather than the updater variant with the little arrows. |
src/engine/sys/sdl_glimp.cpp
Outdated
name on the game windows instead of the engine binary name. This also | ||
makes possible to display the correct icon if that WMCLASS is also set | ||
in the net.unvanquished.Unvanquished.desktop file. */ | ||
Sys::SetEnv( "SDL_VIDEO_X11_WMCLASS", PRODUCT_NAME ); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These should also be PRODUCT_APPID
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh lol, I did not noticed that the default WMCLASS was the APPID, which makes sense btw.
So now all those hints are using PRODUCT_APPID
.
This has the side effect of displaying net.unvanquished.Unvanquished
in the taskbar if there is no XDG icon though.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This has the side effect of displaying
net.unvanquished.Unvanquished
in the taskbar if there is no XDG icon though.
This is probably a bug of the GNOME extension I use. The window name is set properly by SDL_CreateWindow()
and is properly displayed in the window title bar and in the GNOME Shell application overview.
f8a78d8
to
0cc8b42
Compare
LGTM. Setting |
0cc8b42
to
1d60d74
Compare
PRODUCT_NAME
as WMCLASS
on LinuxAPPID
as WMCLASS
on Linux
I only reworded the comment a bit. |
Let X11 and Wayland desktops (Linux, FreeBSD…) display the game name on the game windows instead of the engine binary name. This also makes possible to display the correct icon if that
WMCLASS
is also set in thenet.unvanquished.Unvanquished.desktop
file.