diff options
author | David Skoland <david.skoland@qt.io> | 2021-10-16 19:08:32 +0200 |
---|---|---|
committer | Tor Arne Vestbø <tor.arne.vestbo@qt.io> | 2021-10-25 22:17:39 +0000 |
commit | 0921caf9769c84192c539db22085d343f1a4b5b1 (patch) | |
tree | 0177c4d2caac4ecf96c7c065c1486feed11eb757 /src/plugins | |
parent | 01f96b1764d0339aca2b7f2de4cef6b97047cb7b (diff) |
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>
Diffstat (limited to 'src/plugins')
-rw-r--r-- | src/plugins/platforms/wasm/qwasmwindow.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
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(); } |