summaryrefslogtreecommitdiff
path: root/libre/quassel/0001-qtui-Set-desktop-file-name.patch
blob: 10f017e9e3fa7b656dec9d33e4bc1df191ed7af1 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: "Jan Alexander Steffens (heftig)" <jan.steffens@gmail.com>
Date: Fri, 22 Mar 2019 22:37:22 +0100
Subject: [PATCH] qtui: Set desktop file name

The XCB platform plugin defaults the WM class to the executable name,
which already matches our desktop file name. Unfortunately, the Wayland
platform plugin prepends the inverted organization domain, resulting in
an app ID of "org.quassel-irc.quasselclient", thus breaking the
association.

Set the desktop file name explicitly so the Wayland platform doesn't get
confused.
---
 src/qtui/monoapplication.cpp | 3 +++
 src/qtui/qtuiapplication.cpp | 3 +++
 2 files changed, 6 insertions(+)

diff --git a/src/qtui/monoapplication.cpp b/src/qtui/monoapplication.cpp
index 809f1147..457a5dce 100644
--- a/src/qtui/monoapplication.cpp
+++ b/src/qtui/monoapplication.cpp
@@ -32,6 +32,9 @@ MonolithicApplication::MonolithicApplication(int &argc, char **argv)
     : QtUiApplication(argc, argv)
 {
     Quassel::setRunMode(Quassel::Monolithic);
+#if QT_VERSION >= 0x050700
+    QGuiApplication::setDesktopFileName(Quassel::buildInfo().applicationName);
+#endif
 }
 
 
diff --git a/src/qtui/qtuiapplication.cpp b/src/qtui/qtuiapplication.cpp
index e5b0b773..42e4bf77 100644
--- a/src/qtui/qtuiapplication.cpp
+++ b/src/qtui/qtuiapplication.cpp
@@ -92,6 +92,9 @@ QtUiApplication::QtUiApplication(int &argc, char **argv)
 #if (QT_VERSION >= QT_VERSION_CHECK(5, 6, 0))
     QGuiApplication::setFallbackSessionManagementEnabled(false);
 #endif
+#if QT_VERSION >= 0x050700
+    QGuiApplication::setDesktopFileName(Quassel::buildInfo().clientApplicationName);
+#endif
 }