summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChris Rendle-Short <chris@killred.net>2019-08-28 09:40:23 +1000
committerChris Rendle-Short <chris@killred.net>2019-08-28 09:50:47 +1000
commitaba8c4180f0ab3d66c44f88b21f137b19d17bde8 (patch)
treef758c29e0474b2d58b84a11dcbde359714b24f2a
parent9a15ef368868babe70c5f7afc962bcb00a8ba8b5 (diff)
Fix missing app ID and icon on Wayland.
X11/Wayland needs to know the name of the .desktop file to show a dock icon and application name. X11 has various means of guessing the filename (often WM_NAME). Wayland is a bit more strict, and requires that either the filename match the AppId or the .desktop filename be specified.
-rw-r--r--main/main.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/main/main.cpp b/main/main.cpp
index fefe570f..907aa9e2 100644
--- a/main/main.cpp
+++ b/main/main.cpp
@@ -92,6 +92,10 @@ int main(int argc, char *argv[]) {
&MainWindow::messageAvailable);
#endif
+#if (QT_VERSION >= QT_VERSION_CHECK(5, 7, 0))
+ QGuiApplication::setDesktopFileName("qtpass.desktop");
+#endif
+
w.show();
return SingleApplication::exec();