summaryrefslogtreecommitdiffstats
path: root/tests/auto/client/shared/coreprotocol.h
diff options
context:
space:
mode:
authorJohan Klokkhammer Helsing <johan.helsing@qt.io>2018-12-06 12:00:55 +0100
committerJohan Helsing <johan.helsing@qt.io>2019-02-15 09:12:35 +0000
commit15b3afd621a5c0e8d1dd1cd9d5ae816e15aa4a1a (patch)
treeefe8e2944f983d1b263ce44efeb2a3eeee6ef0bb /tests/auto/client/shared/coreprotocol.h
parent8073af6668cbcf308c83359ef2797d85d971946f (diff)
Client: Refactor cursors and fix various bugs
This patch is mostly a cleanup to prepare for implementations of xcursor-configuration, but also fixes a couple of issues. Most of the logic has now been moved out of QWaylandDisplay and QWaylandCursor and into QWaylandInputDevice and QWaylandInputDevice::Pointer. QWaylandDisplay now only contains mechanisms for avoiding loading the same theme multiple times. There is now only one setCursor method on QWaylandInputDevice, accepting a QCursor and storing its values so changing scale factor doesn't require calling setCursor again. QWaylandInputDevice::Pointer::updateCursor() is called instead. Cursor buffer scale is now set according to enter/leave events of the cursor surface itself instead of the current window, this fixes incorrect buffer scales for cursors on windows that span multiple outputs. The window buffer scale can still be passed into the seat as a fallback until the first enter event is received. This also fixes a bug where the QWaylandBuffer of a bitmap cursor could be deleted while it was being used as a cursor. [ChangeLog][QPA plugin] Fixed a bug where the DPI of bitmap cursors were not sent to the compositor, leading to the compositor incorrectly scaling the cursor up or down. [ChangeLog][QPA plugin] Fixed a bug where bitmap cursor hotspots were off when the screen scale factor was different from the bitmap cursor device pixel ratio. Task-number: QTBUG-68571 Change-Id: I747a47ffff01b7b5f6a0ede3552ab37884c4fa60 Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
Diffstat (limited to 'tests/auto/client/shared/coreprotocol.h')
-rw-r--r--tests/auto/client/shared/coreprotocol.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/tests/auto/client/shared/coreprotocol.h b/tests/auto/client/shared/coreprotocol.h
index 249c16f42..699dcbded 100644
--- a/tests/auto/client/shared/coreprotocol.h
+++ b/tests/auto/client/shared/coreprotocol.h
@@ -284,7 +284,8 @@ public:
void sendAxis(wl_client *client, axis axis, qreal value);
Seat *m_seat = nullptr;
- uint m_enterSerial = 0;
+ QVector<uint> m_enterSerials;
+ QPoint m_hotspot;
signals:
void setCursor(uint serial); //TODO: add arguments?