summaryrefslogtreecommitdiffstats
path: root/src/client
diff options
context:
space:
mode:
authorLiang Qi <liang.qi@qt.io>2024-04-12 13:29:56 +0200
committerLiang Qi <liang.qi@qt.io>2024-04-22 15:44:41 +0200
commitf7a2d52336123d30253cc3548d4a971167b3d965 (patch)
tree18fbd6d0586df830f996d1e62ab3f0a863146b01 /src/client
parentae380d3430276b7bdb4d89570c2d8ed4976598b3 (diff)
client: implement QWaylandScreen::topLevelAt()
For security reason, Wayland doesn't provide global position for top level windows in most cases. Task-number: QTBUG-113404 Pick-to: 6.7 6.5 6.2 5.15 Change-Id: I2cd11b641fba6582cf96cfbea16f5e598a473db5 Reviewed-by: David Edmundson <davidedmundson@kde.org>
Diffstat (limited to 'src/client')
-rw-r--r--src/client/qwaylandscreen.cpp10
-rw-r--r--src/client/qwaylandscreen_p.h2
2 files changed, 12 insertions, 0 deletions
diff --git a/src/client/qwaylandscreen.cpp b/src/client/qwaylandscreen.cpp
index 3faef3f25..d51e8c6a0 100644
--- a/src/client/qwaylandscreen.cpp
+++ b/src/client/qwaylandscreen.cpp
@@ -170,6 +170,16 @@ QList<QPlatformScreen *> QWaylandScreen::virtualSiblings() const
return list;
}
+QWindow *QWaylandScreen::topLevelAt(const QPoint & pos) const
+{
+ if (QWaylandWindow::fixedToplevelPositions) {
+ Q_UNUSED(pos);
+ return nullptr;
+ }
+
+ return QPlatformScreen::topLevelAt(pos);
+}
+
Qt::ScreenOrientation QWaylandScreen::orientation() const
{
return m_orientation;
diff --git a/src/client/qwaylandscreen_p.h b/src/client/qwaylandscreen_p.h
index ff3d23217..ce3df3099 100644
--- a/src/client/qwaylandscreen_p.h
+++ b/src/client/qwaylandscreen_p.h
@@ -63,6 +63,8 @@ public:
QDpi logicalDpi() const override;
QList<QPlatformScreen *> virtualSiblings() const override;
+ QWindow *topLevelAt(const QPoint &point) const override;
+
Qt::ScreenOrientation orientation() const override;
int scale() const;
qreal devicePixelRatio() const override;