hc
2023-02-13 e440ec23c5a540cdd3f7464e8779219be6fd3d95
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
From 39f8c746c89698b997a213af4e2f429cd3ab4cb2 Mon Sep 17 00:00:00 2001
From: Jeffy Chen <jeffy.chen@rock-chips.com>
Date: Sat, 9 May 2020 17:28:29 +0800
Subject: [PATCH 10/15] qwaylandwindow: Support setting window activate
 
Support setting window activate through app_id, for example:
app_id = "requests=activate"
 
Signed-off-by: Jeffy Chen <jeffy.chen@rock-chips.com>
---
 src/client/qwaylandwindow.cpp | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)
 
diff --git a/src/client/qwaylandwindow.cpp b/src/client/qwaylandwindow.cpp
index b83be29..7940dd7 100644
--- a/src/client/qwaylandwindow.cpp
+++ b/src/client/qwaylandwindow.cpp
@@ -1105,7 +1105,13 @@ void QWaylandWindow::restoreMouseCursor(QWaylandInputDevice *device)
 
 void QWaylandWindow::requestActivateWindow()
 {
-    qCWarning(lcQpaWayland) << "Wayland does not support QWindow::requestActivate()";
+    if (!mShellSurface) {
+        qCWarning(lcQpaWayland) << "Wayland does not support QWindow::requestActivate()";
+        return;
+    }
+
+    // HACK: Set window activate through app id
+    mShellSurface->setAppId(QLatin1String("requests=activate"));
 }
 
 bool QWaylandWindow::isExposed() const
-- 
2.20.1