From ac188d9582af49fd1bd8de992fddd4740abb5ce3 Mon Sep 17 00:00:00 2001 From: Gunnar Sletta Date: Fri, 25 Nov 2011 14:02:12 +0100 Subject: Introduce QWindowSystemInterface::handleSynchronousCloseEvent MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit And use it from the Cocoa backend. In general, for threaded GL rendering to work, any function that affect the surface must be synchronous, so the implementor (such as QQuickCanvas) can pick it up and block until the GL context has released the surface. Otherwise, we will crash. Change-Id: Id8484dac7452fe96fa80ade4ea321145f32124b4 Reviewed-by: Samuel Rødal --- src/gui/kernel/qwindowsysteminterface_qpa.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'src/gui/kernel/qwindowsysteminterface_qpa.cpp') 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 -- cgit v1.2.3