summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIlya Fedin <fedin-ilja2010@ya.ru>2022-04-12 05:46:20 +0400
committerIlya Fedin <fedin-ilja2010@ya.ru>2022-06-01 04:34:45 +0400
commit70106d6f7f3a8d4762e49a891ed1b267d96ca217 (patch)
tree4308f5f2508976877ce1fd1bd8edf010665ef13b
parent566099e2d43dfc8a4e3f1fefb9295ac21e0056bf (diff)
downloadqtwayland-70106d6f7f3a8d4762e49a891ed1b267d96ca217.tar.gz
Client: fix mouse cursor restoring check when cursor enters the content area
In a32cc186e645e8dac6dd7089f374f6d20e924f39, 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 <jgrulich@redhat.com> Reviewed-by: Aleix Pol Gonzalez <aleixpol@kde.org>
-rw-r--r--src/client/qwaylandwindow.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/client/qwaylandwindow.cpp b/src/client/qwaylandwindow.cpp
index dce6590a..87baeff5 100644
--- a/src/client/qwaylandwindow.cpp
+++ b/src/client/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);
}