Fix wayland icon with SDL_VIDEO_WAYLAND_WMCLASS

This is used by SDL to set the xdg_toplevel app_id
This commit is contained in:
Colin Kinloch 2024-06-04 11:30:18 +01:00 committed by tildearrow
parent 39d40204c3
commit 53ddffeb14
2 changed files with 5 additions and 0 deletions

View file

@ -6744,6 +6744,9 @@ bool FurnaceGUI::init() {
SDL_SetHint(SDL_HINT_X11_WINDOW_TYPE,"_NET_WM_WINDOW_TYPE_NORMAL");
#endif
// This sets the icon in wayland
SDL_setenv("SDL_VIDEO_WAYLAND_WMCLASS", FURNACE_APP_ID, 0);
// initialize SDL
logD("initializing video...");
if (SDL_Init(SDL_INIT_VIDEO)!=0) {