summaryrefslogtreecommitdiffstats
path: root/src/plugins/platforms
diff options
context:
space:
mode:
authorRobin Burchell <robin.burchell@jollamobile.com>2013-11-20 17:10:52 +0100
committerRobin Burchell <robin+qt@viroteck.net>2013-11-21 18:56:14 +0100
commit8cd1a77a0a64a4e90e377745a28e7159df64d7bf (patch)
tree3ef579ea720e17c580f5d51cfef04120be19be56 /src/plugins/platforms
parentd505853a50bc9751e586031f7d210b3ada0f2f5d (diff)
Override QPlatformWindow::requestActivateWindow
The default implementation assumes activation always succeeds, which might not be the case. The override is a no-op, making the window activation follow keyboard focus set by the compositor. Change-Id: I95c8cd03902a5eecd3dfbfffc338ab191e1c4f71 Done-with: Mikko Harju <mikko.harju@jolla.com> Reviewed-by: Andrew Knight <andrew.knight@digia.com> Reviewed-by: Jørgen Lind <jorgen.lind@digia.com>
Diffstat (limited to 'src/plugins/platforms')
-rw-r--r--src/plugins/platforms/wayland_common/qwaylandwindow.cpp6
-rw-r--r--src/plugins/platforms/wayland_common/qwaylandwindow.h2
2 files changed, 8 insertions, 0 deletions
diff --git a/src/plugins/platforms/wayland_common/qwaylandwindow.cpp b/src/plugins/platforms/wayland_common/qwaylandwindow.cpp
index 60b899cc0..b64d3e6ab 100644
--- a/src/plugins/platforms/wayland_common/qwaylandwindow.cpp
+++ b/src/plugins/platforms/wayland_common/qwaylandwindow.cpp
@@ -588,6 +588,12 @@ void QWaylandWindow::restoreMouseCursor(QWaylandInputDevice *device)
setMouseCursor(device, window()->cursor().shape());
}
+void QWaylandWindow::requestActivateWindow()
+{
+ // no-op. Wayland does not have activation protocol,
+ // we rely on compositor setting keyboard focus based on window stacking.
+}
+
bool QWaylandWindow::setMouseGrabEnabled(bool grab)
{
if (window()->type() != Qt::Popup) {
diff --git a/src/plugins/platforms/wayland_common/qwaylandwindow.h b/src/plugins/platforms/wayland_common/qwaylandwindow.h
index 6e548b20a..e6d15c6c4 100644
--- a/src/plugins/platforms/wayland_common/qwaylandwindow.h
+++ b/src/plugins/platforms/wayland_common/qwaylandwindow.h
@@ -136,6 +136,8 @@ public:
void raise() Q_DECL_OVERRIDE;
void lower() Q_DECL_OVERRIDE;
+ void requestActivateWindow() Q_DECL_OVERRIDE;
+
QWaylandDecoration *decoration() const;
void setDecoration(QWaylandDecoration *decoration);