Fix application name on Wayland in flatpak

fixes #903
This commit is contained in:
Nicolas Werner 2022-02-09 23:46:49 +01:00
parent 19e2527b4b
commit dfb8f9a160
No known key found for this signature in database
GPG key ID: C8D75E610773F2D9
3 changed files with 10 additions and 4 deletions

View file

@ -231,10 +231,11 @@ main(int argc, char *argv[])
#if !defined(Q_OS_MAC)
app.setWindowIcon(QIcon::fromTheme(QStringLiteral("nheko"), QIcon{":/logos/nheko.png"}));
#endif
if (userdata.isEmpty() || userdata == QLatin1String("default"))
app.setDesktopFileName(QStringLiteral("nheko"));
else
app.setDesktopFileName("nheko[" + userdata + "]");
#ifdef NHEKO_FLATPAK
app.setDesktopFileName(QStringLiteral("io.github.NhekoReborn.Nheko"));
#else
app.setDesktopFileName(QStringLiteral("nheko"));
#endif
http::init();