QWaylandTablet: Update input device serial on events
Fixes: QTBUG-118640 Pick-to: 6.8 6.7 Change-Id: I46ed31d85f9c80ac27ab9c161c23fcb429f82f43 Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
This commit is contained in:
parent
1dc1938cd7
commit
de63a04367
@ -193,6 +193,7 @@ protected:
|
||||
friend class QWaylandPointerGestureSwipe;
|
||||
friend class QWaylandPointerGesturePinch;
|
||||
friend class QWaylandWindow;
|
||||
friend class QWaylandTabletToolV2;
|
||||
};
|
||||
|
||||
inline uint32_t QWaylandInputDevice::serial() const
|
||||
|
@ -153,7 +153,9 @@ void QWaylandTabletToolV2::zwp_tablet_tool_v2_removed()
|
||||
void QWaylandTabletToolV2::zwp_tablet_tool_v2_proximity_in(uint32_t serial, zwp_tablet_v2 *tablet, wl_surface *surface)
|
||||
{
|
||||
Q_UNUSED(tablet);
|
||||
Q_UNUSED(serial);
|
||||
|
||||
m_tabletSeat->seat()->mSerial = serial;
|
||||
|
||||
if (Q_UNLIKELY(!surface)) {
|
||||
qCDebug(lcQpaWayland) << "Ignoring zwp_tablet_tool_v2_proximity_v2 with no surface";
|
||||
return;
|
||||
@ -172,6 +174,8 @@ void QWaylandTabletToolV2::zwp_tablet_tool_v2_down(uint32_t serial)
|
||||
{
|
||||
m_pending.down = true;
|
||||
|
||||
m_tabletSeat->seat()->mSerial = serial;
|
||||
|
||||
if (m_pending.proximitySurface) {
|
||||
if (QWaylandWindow *window = m_pending.proximitySurface->waylandWindow()) {
|
||||
QWaylandInputDevice *seat = m_tabletSeat->seat();
|
||||
@ -230,7 +234,8 @@ static Qt::MouseButton mouseButtonFromTablet(uint button)
|
||||
|
||||
void QWaylandTabletToolV2::zwp_tablet_tool_v2_button(uint32_t serial, uint32_t button, uint32_t state)
|
||||
{
|
||||
Q_UNUSED(serial);
|
||||
m_tabletSeat->seat()->mSerial = serial;
|
||||
|
||||
Qt::MouseButton mouseButton = mouseButtonFromTablet(button);
|
||||
if (state == button_state_pressed)
|
||||
m_pending.buttons |= mouseButton;
|
||||
|
Loading…
x
Reference in New Issue
Block a user