Skip to content

Commit

Permalink
wasm: Hide popups when a window is left-clicked
Browse files Browse the repository at this point in the history
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 <[email protected]>
  • Loading branch information
David Skoland authored and torarnv committed Oct 25, 2021
1 parent 01f96b1 commit 0921caf
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/plugins/platforms/wasm/qwasmwindow.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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();
}

Expand Down

0 comments on commit 0921caf

Please sign in to comment.