summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorVlad Zahorodnii <vlad.zahorodnii@kde.org>2022-11-22 20:58:22 +0200
committerQt Cherry-pick Bot <cherrypick_bot@qt-project.org>2022-11-30 11:26:20 +0000
commitdf401d596364fd6a90dc1527a85d97ff863deae1 (patch)
tree4d24f292b904eb15c37758147ee250be09ae03e8
parent4cc3ce4a20fb46ed70094bd1c9a4c735eb37cc60 (diff)
Client: Honor QGuiApplication::overrideCursor()
If there's a QGuiApplication::overrideCursor(), QWindow::cursor() can still return a different cursor. This can result in a wrong cursor when the pointer enters a window. Fixes: QTBUG-75919 Change-Id: I015117b4b6d252b421ab14bd8f2a8f582f7cae52 Reviewed-by: Liang Qi <liang.qi@qt.io> (cherry picked from commit 471b2123400ef6936b5173553205549c7dd1a249) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
-rw-r--r--src/client/qwaylandwindow.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/client/qwaylandwindow.cpp b/src/client/qwaylandwindow.cpp
index 47f643f73..514768772 100644
--- a/src/client/qwaylandwindow.cpp
+++ b/src/client/qwaylandwindow.cpp
@@ -1053,7 +1053,10 @@ void QWaylandWindow::setMouseCursor(QWaylandInputDevice *device, const QCursor &
void QWaylandWindow::restoreMouseCursor(QWaylandInputDevice *device)
{
- setMouseCursor(device, window()->cursor());
+ if (const QCursor *overrideCursor = QGuiApplication::overrideCursor())
+ setMouseCursor(device, *overrideCursor);
+ else
+ setMouseCursor(device, window()->cursor());
}
#endif