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
parent
a4b8e7141b
commit
ca32a373b3
|
|
@ -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);
|
||||
|
|
|
|||
Loading…
Reference in New Issue