Changeset View
Changeset View
Standalone View
Standalone View
src/server/seat_interface_p.h
Show All 18 Lines | |||||
19 | *********************************************************************/ | 19 | *********************************************************************/ | ||
20 | #ifndef WAYLAND_SERVER_SEAT_INTERFACE_P_H | 20 | #ifndef WAYLAND_SERVER_SEAT_INTERFACE_P_H | ||
21 | #define WAYLAND_SERVER_SEAT_INTERFACE_P_H | 21 | #define WAYLAND_SERVER_SEAT_INTERFACE_P_H | ||
22 | // KWayland | 22 | // KWayland | ||
23 | #include "seat_interface.h" | 23 | #include "seat_interface.h" | ||
24 | #include "global_p.h" | 24 | #include "global_p.h" | ||
25 | // Qt | 25 | // Qt | ||
26 | #include <QHash> | 26 | #include <QHash> | ||
27 | #include <QMap> | ||||
27 | #include <QPointer> | 28 | #include <QPointer> | ||
28 | #include <QVector> | 29 | #include <QVector> | ||
29 | // Wayland | 30 | // Wayland | ||
30 | #include <wayland-server.h> | 31 | #include <wayland-server.h> | ||
31 | 32 | | |||
32 | namespace KWayland | 33 | namespace KWayland | ||
33 | { | 34 | { | ||
34 | namespace Server | 35 | namespace Server | ||
▲ Show 20 Lines • Show All 107 Lines • ▼ Show 20 Line(s) | 43 | public: | |||
142 | 143 | | |||
143 | // Touch related members | 144 | // Touch related members | ||
144 | struct Touch { | 145 | struct Touch { | ||
145 | struct Focus { | 146 | struct Focus { | ||
146 | SurfaceInterface *surface = nullptr; | 147 | SurfaceInterface *surface = nullptr; | ||
147 | QVector<TouchInterface*> touchs; | 148 | QVector<TouchInterface*> touchs; | ||
148 | QMetaObject::Connection destroyConnection; | 149 | QMetaObject::Connection destroyConnection; | ||
149 | QPointF offset = QPointF(); | 150 | QPointF offset = QPointF(); | ||
151 | QPointF firstTouchPos; | ||||
150 | }; | 152 | }; | ||
151 | Focus focus; | 153 | Focus focus; | ||
152 | QVector<qint32> ids; | 154 | QMap<qint32, quint32> ids; | ||
davidedmundson: If you don't need the order QHash over QMap | |||||
Needs to be a QMap now again with the last() call in the touchDown method. romangg: Needs to be a QMap now again with the last() call in the touchDown method. | |||||
153 | }; | 155 | }; | ||
154 | Touch globalTouch; | 156 | Touch globalTouch; | ||
155 | 157 | | |||
156 | struct Drag { | 158 | struct Drag { | ||
157 | enum class Mode { | 159 | enum class Mode { | ||
158 | None, | 160 | None, | ||
159 | Pointer, | 161 | Pointer, | ||
160 | Touch | 162 | Touch | ||
161 | }; | 163 | }; | ||
162 | Mode mode = Mode::None; | 164 | Mode mode = Mode::None; | ||
163 | DataDeviceInterface *source = nullptr; | 165 | DataDeviceInterface *source = nullptr; | ||
164 | DataDeviceInterface *target = nullptr; | 166 | DataDeviceInterface *target = nullptr; | ||
165 | SurfaceInterface *surface = nullptr; | 167 | SurfaceInterface *surface = nullptr; | ||
166 | PointerInterface *sourcePointer = nullptr; | 168 | PointerInterface *sourcePointer = nullptr; | ||
169 | TouchInterface *sourceTouch = nullptr; | ||||
167 | QMatrix4x4 transformation; | 170 | QMatrix4x4 transformation; | ||
168 | QMetaObject::Connection destroyConnection; | 171 | QMetaObject::Connection destroyConnection; | ||
169 | QMetaObject::Connection dragSourceDestroyConnection; | 172 | QMetaObject::Connection dragSourceDestroyConnection; | ||
170 | }; | 173 | }; | ||
171 | Drag drag; | 174 | Drag drag; | ||
172 | 175 | | |||
173 | static SeatInterface *get(wl_resource *native) { | 176 | static SeatInterface *get(wl_resource *native) { | ||
174 | auto s = cast(native); | 177 | auto s = cast(native); | ||
Show All 29 Lines |
If you don't need the order QHash over QMap