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.
This commit is contained in:
parent
4dba1da7c7
commit
5578437522
1 changed files with 6 additions and 4 deletions
|
@ -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…
Reference in a new issue