X11: Use different class when built as Flatpak

This commit is contained in:
Dexter Reed 2024-03-24 14:05:34 +00:00
parent e5ef11d6bb
commit a75515c191
No known key found for this signature in database
GPG Key ID: 68E4C1548B4808AF

View File

@ -338,8 +338,13 @@ static void DoCreateWindow(int width, int height) {
/* So right name appears in e.g. Ubuntu Unity launchbar */ /* So right name appears in e.g. Ubuntu Unity launchbar */
XClassHint hint = { 0 }; XClassHint hint = { 0 };
#ifdef CC_BUILD_FLATPAK
hint.res_name = "net.classicube.flatpak.client";
hint.res_class = "net.classicube.flatpak.client";
#else
hint.res_name = GAME_APP_TITLE; hint.res_name = GAME_APP_TITLE;
hint.res_class = GAME_APP_TITLE; hint.res_class = GAME_APP_TITLE;
#endif
XSetClassHint(win_display, win_handle, &hint); XSetClassHint(win_display, win_handle, &hint);
ApplyIcon(); ApplyIcon();