1From 0f4945f9cc03452f2a20d7a48d53b2085ee80bfe Mon Sep 17 00:00:00 2001 2From: Jeffy Chen <jeffy.chen@rock-chips.com> 3Date: Sat, 9 May 2020 17:28:29 +0800 4Subject: [PATCH 10/17] qwaylandwindow: Support setting window activate 5 6Support setting window activate through app_id, for example: 7app_id = "requests=activate" 8 9Signed-off-by: Jeffy Chen <jeffy.chen@rock-chips.com> 10--- 11 src/client/qwaylandwindow.cpp | 8 +++++++- 12 1 file changed, 7 insertions(+), 1 deletion(-) 13 14diff --git a/src/client/qwaylandwindow.cpp b/src/client/qwaylandwindow.cpp 15index 7c18a72..032008f 100644 16--- a/src/client/qwaylandwindow.cpp 17+++ b/src/client/qwaylandwindow.cpp 18@@ -1123,7 +1123,13 @@ void QWaylandWindow::restoreMouseCursor(QWaylandInputDevice *device) 19 20 void QWaylandWindow::requestActivateWindow() 21 { 22- qCWarning(lcQpaWayland) << "Wayland does not support QWindow::requestActivate()"; 23+ if (!mShellSurface) { 24+ qCWarning(lcQpaWayland) << "Wayland does not support QWindow::requestActivate()"; 25+ return; 26+ } 27+ 28+ // HACK: Set window activate through app id 29+ mShellSurface->setAppId(QLatin1String("requests=activate")); 30 } 31 32 bool QWaylandWindow::isExposed() const 33-- 342.20.1 35 36