Fix losing grip on dragged window on WASM

When a window is being dragged, we should not check for the target
window's resizability in QWasmCompositor::processMouse as:
1) the target window under the cursor might be different from the
dragged window when the pointer is moving quickly
2) we have checked that already when qualifying the window for dragging
when handling EMSCRIPTEN_EVENT_MOUSEDOWN at line 1022

Therefore, the condition for target window's resizability has been
removed.

Change-Id: Ib999d213f1e0a770fa76324fc7bf44c6d4ab806a
Reviewed-by: David Skoland <david.skoland@qt.io>
Reviewed-by: Lorn Potter <lorn.potter@gmail.com>
bb10
Mikolaj Boc 2022-07-14 16:06:40 +02:00
parent e4ed618a66
commit a7e187cf16
1 changed files with 1 additions and 1 deletions

View File

@ -1073,7 +1073,7 @@ bool QWasmCompositor::processMouse(int eventType, const EmscriptenMouseEvent *mo
}
}
if (m_windowBeingManipulated && isTargetWindowResizable) {
if (m_windowBeingManipulated) {
if (m_resizeMode == QWasmCompositor::ResizeNone) {
m_windowBeingManipulated->setPosition(
m_windowBeingManipulated->position() + QPoint(mouseEvent->movementX, mouseEvent->movementY));