diff options
author | Vlad Zahorodnii <vlad.zahorodnii@kde.org> | 2022-11-22 20:58:22 +0200 |
---|---|---|
committer | Qt Cherry-pick Bot <cherrypick_bot@qt-project.org> | 2022-11-30 10:41:20 +0000 |
commit | 2eaba7e89d14e733608328243f75854909ed10d0 (patch) | |
tree | a1bdc1058724fcda3aed3190d9064a2c847084dd /src/client/qwaylandwindow.cpp | |
parent | 8e93c9a30eb8cb26f76ad497a369659f50e174c4 (diff) | |
download | qtwayland-2eaba7e89d14e733608328243f75854909ed10d0.tar.gz |
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>
Diffstat (limited to 'src/client/qwaylandwindow.cpp')
-rw-r--r-- | src/client/qwaylandwindow.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/client/qwaylandwindow.cpp b/src/client/qwaylandwindow.cpp index 4fd012de..129ff52b 100644 --- a/src/client/qwaylandwindow.cpp +++ b/src/client/qwaylandwindow.cpp @@ -1249,7 +1249,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 |