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.
wilder/Plasma/6.2
David Edmundson 2 years ago
parent 4d659998d4
commit 044c9f0154
  1. 10
      src/wayland/seat.cpp

@ -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();
}

Loading…
Cancel
Save