From 92d67b58b8dbe2c5e63c5e57a179a3dc9acf382b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tor=20Arne=20Vestb=C3=B8?= Date: Mon, 16 Oct 2017 11:54:21 +0200 Subject: macOS: Defer update request on drawRect: when a real expose event is needed MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The semantics of QWindow::requestUpdate() is that it's used when the window needs updates outside of the normal window invalidation callbacks such as expose and resize events, e.g. when doing animations. As a result, user code might not be prepared to handle window invalidations in the update-request callback, assuming those will still be delivered as normal, so that's what we do. This was exposed by resizing one of the simpler Qt Quick examples, where the resize's expose event was delivered as an update request, but didn't trigger an unconditional draw of the window as it should, as the scenegraph didn't change in response to the resize, which is typical for an update request. Change-Id: Ida8f85f1cf61c332aa9b199520e6854c48d3ab40 Reviewed-by: Morten Johan Sørvig --- src/plugins/platforms/cocoa/qcocoawindow.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/plugins/platforms/cocoa/qcocoawindow.h') diff --git a/src/plugins/platforms/cocoa/qcocoawindow.h b/src/plugins/platforms/cocoa/qcocoawindow.h index 3230c32133..6fbe29f683 100644 --- a/src/plugins/platforms/cocoa/qcocoawindow.h +++ b/src/plugins/platforms/cocoa/qcocoawindow.h @@ -262,7 +262,7 @@ public: // for QNSView bool m_hasModalSession; bool m_frameStrutEventsEnabled; - bool m_isExposed; + QRect m_exposedRect; int m_registerTouchCount; bool m_resizableTransientParent; -- cgit v1.2.3