wayland: Only send artificial mouse up events for xwayland drags

Seat has to handle two types of drags; ones where clients are updated
through data device, and xwayland version where the drag target has
mouse events sents as pointer events. A mechanism to treat them
differently was introduced, but this former xwayland hack was not
included. We also don't need to send frame events when in datadevice
mode.

This reset of pointer state breaks electron.
This commit is contained in:
David Edmundson 2024-03-08 16:41:36 +00:00
parent 4d659998d4
commit 044c9f0154

View file

@ -732,7 +732,11 @@ void SeatInterface::notifyPointerButton(quint32 button, PointerButtonState state
// not our drag button - ignore
return;
}
d->pointer->sendButton(button, state, serial);
SurfaceInterface *focusedSurface = focusedPointerSurface();
if (focusedSurface && !d->dragInhibitsPointer(focusedSurface)) {
d->pointer->sendButton(button, state, serial);
}
d->endDrag();
return;
}
@ -746,6 +750,10 @@ void SeatInterface::notifyPointerFrame()
if (!d->pointer) {
return;
}
SurfaceInterface *focusedSurface = focusedPointerSurface();
if (focusedSurface && d->dragInhibitsPointer(focusedSurface)) {
return;
}
d->pointer->sendFrame();
}