diff options
-rw-r--r-- | src/gui/kernel/qwindowsysteminterface_qpa.cpp | 8 | ||||
-rw-r--r-- | src/gui/kernel/qwindowsysteminterface_qpa.h | 1 | ||||
-rw-r--r-- | src/plugins/platforms/cocoa/qcocoawindow.mm | 2 |
3 files changed, 10 insertions, 1 deletions
diff --git a/src/gui/kernel/qwindowsysteminterface_qpa.cpp b/src/gui/kernel/qwindowsysteminterface_qpa.cpp index 4a704d8051..17a5bb4eda 100644 --- a/src/gui/kernel/qwindowsysteminterface_qpa.cpp +++ b/src/gui/kernel/qwindowsysteminterface_qpa.cpp @@ -108,6 +108,14 @@ void QWindowSystemInterface::handleCloseEvent(QWindow *tlw) } } +void QWindowSystemInterface::handleSynchronousCloseEvent(QWindow *tlw) +{ + if (tlw) { + QWindowSystemInterfacePrivate::CloseEvent e(tlw); + QGuiApplicationPrivate::processWindowSystemEvent(&e); + } +} + /*! \a tlw == 0 means that \a ev is in global coords only diff --git a/src/gui/kernel/qwindowsysteminterface_qpa.h b/src/gui/kernel/qwindowsysteminterface_qpa.h index 7102a0fe04..04e8a6e01c 100644 --- a/src/gui/kernel/qwindowsysteminterface_qpa.h +++ b/src/gui/kernel/qwindowsysteminterface_qpa.h @@ -98,6 +98,7 @@ public: static void handleGeometryChange(QWindow *w, const QRect &newRect); static void handleSynchronousGeometryChange(QWindow *w, const QRect &newRect); static void handleCloseEvent(QWindow *w); + static void handleSynchronousCloseEvent(QWindow *w); static void handleEnterEvent(QWindow *w); static void handleLeaveEvent(QWindow *w); static void handleWindowActivated(QWindow *w); diff --git a/src/plugins/platforms/cocoa/qcocoawindow.mm b/src/plugins/platforms/cocoa/qcocoawindow.mm index 9caade6a10..de38db5fab 100644 --- a/src/plugins/platforms/cocoa/qcocoawindow.mm +++ b/src/plugins/platforms/cocoa/qcocoawindow.mm @@ -233,7 +233,7 @@ void QCocoaWindow::windowDidResize() void QCocoaWindow::windowWillClose() { - QWindowSystemInterface::handleCloseEvent(window()); + QWindowSystemInterface::handleSynchronousCloseEvent(window()); } void QCocoaWindow::setCurrentContext(QCocoaGLContext *context) |