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>
bb10
Lorn Potter 2019-02-20 11:46:07 +10:00
parent a4b8e7141b
commit ca32a373b3
1 changed files with 3 additions and 1 deletions

View File

@ -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);