qt5-qtwayland/0044-Client-Fix-handling-of-Qt-BlankCursor.patch

39 lines
1.3 KiB
Diff
Raw Normal View History

2023-10-08 14:36:55 +00:00
From 4b4bfbb61b7f232061e0b8e0d4be6487596a3521 Mon Sep 17 00:00:00 2001
2023-04-11 11:34:57 +00:00
From: Vlad Zahorodnii <vlad.zahorodnii@kde.org>
Date: Tue, 22 Nov 2022 23:27:34 +0200
2023-10-08 14:36:55 +00:00
Subject: [PATCH 44/59] Client: Fix handling of Qt::BlankCursor
2023-04-11 11:34:57 +00:00
The cursor may not be properly set when a window has Qt::BlankCursor and
it's shown. In that case, the cursor surface may not be present and
wl_pointer.set_cursor won't be called.
On the other hand, wl_pointer.set_cursor must be always called when
wl_pointer.enter is received.
Pick-to: 6.5
Change-Id: I8540e7a02df1579b3380a1a1d4cfab42c1ab3104
Reviewed-by: David Edmundson <davidedmundson@kde.org>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
(cherry picked from commit e954853f0e68d78ac1a98bc3533713881496064c)
---
src/client/qwaylandinputdevice.cpp | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/src/client/qwaylandinputdevice.cpp b/src/client/qwaylandinputdevice.cpp
2023-10-08 14:36:55 +00:00
index 4d58e9ab..132c5345 100644
2023-04-11 11:34:57 +00:00
--- a/src/client/qwaylandinputdevice.cpp
+++ b/src/client/qwaylandinputdevice.cpp
@@ -310,8 +310,7 @@ void QWaylandInputDevice::Pointer::updateCursor()
auto shape = seat()->mCursor.shape;
if (shape == Qt::BlankCursor) {
- if (mCursor.surface)
- mCursor.surface->hide();
+ getOrCreateCursorSurface()->hide();
return;
}
--
2023-10-08 14:36:55 +00:00
2.41.0
2023-04-11 11:34:57 +00:00