wasm: Hide popups when a window is left-clicked

This logic is taken from the macOS platform implementation and seems
reasonable to reuse in WASM.

Fixes: QTBUG-90990
Change-Id: Id4a4dd8d9fdd9de3085bfcd9079793aad3dda363
Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
This commit is contained in:
David Skoland 2021-10-16 19:08:32 +02:00 committed by Tor Arne Vestbø
parent 01f96b1764
commit 0921caf976

View File

@ -192,6 +192,9 @@ void QWasmWindow::injectMousePressed(const QPoint &local, const QPoint &global,
else if (normButtonRect().contains(global))
m_activeControl = QWasmCompositor::SC_TitleBarNormalButton;
if (button == Qt::LeftButton)
QGuiApplicationPrivate::instance()->closeAllPopups();
invalidate();
}