Null-check for window when handling pointer events
There might not be a window at the pointer event position on a WASM screen, especially when the main window is not fullscreen. Change-Id: I29aac8c410fdf2bf97cd1ed12433d87e18b4a354 Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
This commit is contained in:
parent
ac0cf6a5cc
commit
15b528dec3
@ -586,8 +586,9 @@ bool QWasmCompositor::processPointer(const PointerEvent& event)
|
||||
|
||||
return targetWindow ? targetWindow : m_lastMouseTargetWindow.get();
|
||||
})();
|
||||
if (targetWindow)
|
||||
m_lastMouseTargetWindow = targetWindow;
|
||||
if (!targetWindow)
|
||||
return false;
|
||||
m_lastMouseTargetWindow = targetWindow;
|
||||
|
||||
const QPoint pointInTargetWindowCoords = targetWindow->mapFromGlobal(event.point);
|
||||
const bool pointerIsWithinTargetWindowBounds = targetWindow->geometry().contains(event.point);
|
||||
|
Loading…
Reference in New Issue
Block a user