From 30c5e3f2377e2de1a89e15e750642018708d94ed Mon Sep 17 00:00:00 2001 From: Cameron Gutman Date: Thu, 25 Feb 2021 23:20:21 -0600 Subject: [PATCH] Fix window icons on Wayland --- app/main.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/app/main.cpp b/app/main.cpp index cab263db..a110e81c 100644 --- a/app/main.cpp +++ b/app/main.cpp @@ -503,6 +503,11 @@ int main(int argc, char *argv[]) app.setWindowIcon(QIcon(":/res/moonlight.svg")); #endif + // This is necessary to show our icon correctly on Wayland + app.setDesktopFileName("com.moonlight_stream.Moonlight.desktop"); + qputenv("SDL_VIDEO_WAYLAND_WMCLASS", "com.moonlight_stream.Moonlight"); + qputenv("SDL_VIDEO_X11_WMCLASS", "com.moonlight_stream.Moonlight"); + // Register our C++ types for QML qmlRegisterType("ComputerModel", 1, 0, "ComputerModel"); qmlRegisterType("AppModel", 1, 0, "AppModel");