wayland: Check serials in move and resize requests

If a move or a resize request is processed after the button is released,
the window will be stuck in the move/resize mode.

This change prevents that kind of race condition by adding relevant serial
checks in the move and the resize request handlers.
remotes/origin/work/kbroulik/noti-dnd
Vlad Zahorodnii 5 years ago
parent 4dba1da7c7
commit 5578437522
  1. 10
      xdgshellclient.cpp

@ -971,15 +971,17 @@ void XdgToplevelClient::handleWindowMenuRequested(SeatInterface *seat, const QPo
void XdgToplevelClient::handleMoveRequested(SeatInterface *seat, quint32 serial)
{
Q_UNUSED(seat)
Q_UNUSED(serial)
if (!seat->hasImplicitPointerGrab(serial) && !seat->hasImplicitTouchGrab(serial)) {
return;
}
performMouseCommand(Options::MouseMove, Cursors::self()->mouse()->pos());
}
void XdgToplevelClient::handleResizeRequested(SeatInterface *seat, Qt::Edges edges, quint32 serial)
{
Q_UNUSED(seat)
Q_UNUSED(serial)
if (!seat->hasImplicitPointerGrab(serial) && !seat->hasImplicitTouchGrab(serial)) {
return;
}
if (!isResizable() || isShade()) {
return;
}

Loading…
Cancel
Save