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
|