From 0921caf9769c84192c539db22085d343f1a4b5b1 Mon Sep 17 00:00:00 2001 From: David Skoland Date: Sat, 16 Oct 2021 19:08:32 +0200 Subject: [PATCH] wasm: Hide popups when a window is left-clicked MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 --- src/plugins/platforms/wasm/qwasmwindow.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/plugins/platforms/wasm/qwasmwindow.cpp b/src/plugins/platforms/wasm/qwasmwindow.cpp index aac7413994..9b790894df 100644 --- a/src/plugins/platforms/wasm/qwasmwindow.cpp +++ b/src/plugins/platforms/wasm/qwasmwindow.cpp @@ -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(); }