diff --git a/src/plugins/platforms/cocoa/qcocoawindow.mm b/src/plugins/platforms/cocoa/qcocoawindow.mm index b0f0d51ecb..a1bed3db45 100644 --- a/src/plugins/platforms/cocoa/qcocoawindow.mm +++ b/src/plugins/platforms/cocoa/qcocoawindow.mm @@ -1487,6 +1487,17 @@ void QCocoaWindow::requestUpdate() void QCocoaWindow::deliverUpdateRequest() { + // Don't send update requests for views that need display, as the update + // request doesn't carry any information about dirty rects, so the app + // may end up painting a smaller region than required. (For some reason + // the layer and view's needsDisplay status isn't always in sync, even if + // the view is layer-backed, not layer-hosted, so we check both). + if (m_view.layer.needsDisplay || m_view.needsDisplay) { + qCDebug(lcQpaDrawing) << "View needs display, deferring update request for" << window(); + requestUpdate(); + return; + } + qCDebug(lcQpaDrawing) << "Delivering update request to" << window(); QPlatformWindow::deliverUpdateRequest(); }