Commit 55784375 authored by Vlad Zahorodnii's avatar Vlad Zahorodnii

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.
parent 4dba1da7
......@@ -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;
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment