Fix window icons on Wayland
This commit is contained in:
parent
6a25a3a3d0
commit
30c5e3f237
1 changed files with 5 additions and 0 deletions
|
|
@ -503,6 +503,11 @@ int main(int argc, char *argv[])
|
||||||
app.setWindowIcon(QIcon(":/res/moonlight.svg"));
|
app.setWindowIcon(QIcon(":/res/moonlight.svg"));
|
||||||
#endif
|
#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
|
// Register our C++ types for QML
|
||||||
qmlRegisterType<ComputerModel>("ComputerModel", 1, 0, "ComputerModel");
|
qmlRegisterType<ComputerModel>("ComputerModel", 1, 0, "ComputerModel");
|
||||||
qmlRegisterType<AppModel>("AppModel", 1, 0, "AppModel");
|
qmlRegisterType<AppModel>("AppModel", 1, 0, "AppModel");
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue