From 4ad1c345a0e52ba37ff951f7e20a28e7f07efd99 Mon Sep 17 00:00:00 2001 From: Liang Qi Date: Fri, 28 Jun 2024 11:37:25 +0200 Subject: [PATCH] Revert "client: implement QWaylandScreen::topLevelAt()" This reverts commit 682f7c4b78ce130d621d70b770062d76cd13fa2a. QtWidgets depends on the old QApplication::topLevelAt() behavior too much, especially for the single top level window case. It's not easy to be decoupled in this way. Task-number: QTBUG-113404 Fixes: QTBUG-125878 Fixes: QTBUG-126313 Pick-to: 6.8 6.7 6.5 Change-Id: I5804d9c600c77e85f4f83753c87815fbbbc2362e Reviewed-by: David Edmundson --- src/plugins/platforms/wayland/qwaylandscreen.cpp | 10 ---------- src/plugins/platforms/wayland/qwaylandscreen_p.h | 2 -- 2 files changed, 12 deletions(-) diff --git a/src/plugins/platforms/wayland/qwaylandscreen.cpp b/src/plugins/platforms/wayland/qwaylandscreen.cpp index d51e8c6a0b6..3faef3f255d 100644 --- a/src/plugins/platforms/wayland/qwaylandscreen.cpp +++ b/src/plugins/platforms/wayland/qwaylandscreen.cpp @@ -170,16 +170,6 @@ QList 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/plugins/platforms/wayland/qwaylandscreen_p.h b/src/plugins/platforms/wayland/qwaylandscreen_p.h index ce3df3099ed..ff3d23217c7 100644 --- a/src/plugins/platforms/wayland/qwaylandscreen_p.h +++ b/src/plugins/platforms/wayland/qwaylandscreen_p.h @@ -63,8 +63,6 @@ public: QDpi logicalDpi() const override; QList virtualSiblings() const override; - QWindow *topLevelAt(const QPoint &point) const override; - Qt::ScreenOrientation orientation() const override; int scale() const; qreal devicePixelRatio() const override;