summaryrefslogtreecommitdiffstats
path: root/src/plugins
diff options
context:
space:
mode:
authorLorn Potter <lorn.potter@gmail.com>2019-02-20 11:46:07 +1000
committerLorn Potter <lorn.potter@gmail.com>2019-02-20 23:03:06 +0000
commitca32a373b31b087b602ca555151e01ed8ea601c1 (patch)
treeff9b5e587be33a4508f15c726953f1928e4c2813 /src/plugins
parenta4b8e7141b3dd3bf3c2ac139b44ece0f74b054d8 (diff)
wasm: fix crash on window close
Change-Id: I07d6edfbfbf056240262b833ccb708dc15f830a3 Fixes: QTBUG-73678 Task-number: QTBUG-73678 Reviewed-by: Edward Welbourne <edward.welbourne@qt.io> Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
Diffstat (limited to 'src/plugins')
-rw-r--r--src/plugins/platforms/wasm/qwasmwindow.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/plugins/platforms/wasm/qwasmwindow.cpp b/src/plugins/platforms/wasm/qwasmwindow.cpp
index 25a0190053..39797cb09d 100644
--- a/src/plugins/platforms/wasm/qwasmwindow.cpp
+++ b/src/plugins/platforms/wasm/qwasmwindow.cpp
@@ -198,8 +198,10 @@ void QWasmWindow::injectMouseReleased(const QPoint &local, const QPoint &global,
if (!hasTitleBar() || button != Qt::LeftButton)
return;
- if (closeButtonRect().contains(global) && m_activeControl == QWasmCompositor::SC_TitleBarCloseButton)
+ if (closeButtonRect().contains(global) && m_activeControl == QWasmCompositor::SC_TitleBarCloseButton) {
window()->close();
+ return;
+ }
if (maxButtonRect().contains(global) && m_activeControl == QWasmCompositor::SC_TitleBarMaxButton) {
window()->setWindowState(Qt::WindowMaximized);