From 74b37c871ba0bad0c175d0d73a29f0e522b27d27 Mon Sep 17 00:00:00 2001 From: cu-kai <13281185+cu-kai@users.noreply.github.com> Date: Thu, 16 Jan 2025 20:46:05 +0000 Subject: [PATCH] identify the game by its name in SDL --- src/engine/client/ClientApplication.cpp | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/src/engine/client/ClientApplication.cpp b/src/engine/client/ClientApplication.cpp index f00737ec34..f33f90bfad 100644 --- a/src/engine/client/ClientApplication.cpp +++ b/src/engine/client/ClientApplication.cpp @@ -85,6 +85,19 @@ class ClientApplication : public Application { // Don't set this for TTY applications as they really aren't DPI aware. Let them scale. SDL_SetHint(SDL_HINT_WINDOWS_DPI_AWARENESS, "system"); #endif + +#if defined(__linux__) && __linux__ && defined(BUILD_GRAPHICAL_CLIENT) + #if SDL_VERSION_ATLEAST(2, 0, 22) + // identify the game by its name in certain + // volume control / power control applets, + // for example, the one found on KDE: + // "Unvanquished is currently blocking sleep." + // instead of "My SDL application ..." + // this feature was introduced in SDL 2.0.22 + SDL_SetHint(SDL_HINT_APP_NAME, PRODUCT_NAME); + #endif +#endif + Hunk_Init(); Com_Init();