From bb3eeb085c49306efd8a53cd687f8837efb8725c Mon Sep 17 00:00:00 2001 From: Ilya Fedin Date: Tue, 12 Apr 2022 05:46:20 +0400 Subject: [PATCH] Client: fix mouse cursor restoring check when cursor enters the content area In a02c408afc1ec3713d26f133277cbba2d207f102, windowContentGeometry was changed by adding shadow margins, but the check ensures that the point inside the content area rather than the decoration and windowContentGeometry is smaller than the decoration geometry now as it excludes the shadow. Creating the geometry from surfaceSize fixes it. Pick-to: 6.3 6.2 Change-Id: If20a387b6864c1bc961352654f827a45cee77bd1 Reviewed-by: Jan Grulich Reviewed-by: Aleix Pol Gonzalez --- src/plugins/platforms/wayland/qwaylandwindow.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/plugins/platforms/wayland/qwaylandwindow.cpp b/src/plugins/platforms/wayland/qwaylandwindow.cpp index dce6590a8ec..87baeff506b 100644 --- a/src/plugins/platforms/wayland/qwaylandwindow.cpp +++ b/src/plugins/platforms/wayland/qwaylandwindow.cpp @@ -1038,7 +1038,7 @@ void QWaylandWindow::handleMouse(QWaylandInputDevice *inputDevice, const QWaylan #if QT_CONFIG(cursor) if (e.type == QEvent::Enter) { - QRect contentGeometry = windowContentGeometry().marginsRemoved(clientSideMargins()); + QRect contentGeometry = QRect(QPoint(), surfaceSize()).marginsRemoved(clientSideMargins()); if (contentGeometry.contains(e.local.toPoint())) restoreMouseCursor(inputDevice); }