summaryrefslogtreecommitdiffstats
path: root/src/plugins/platforms/cocoa/qcocoawindow.mm
diff options
context:
space:
mode:
authorTor Arne Vestbø <tor.arne.vestbo@qt.io>2019-08-21 12:36:21 +0200
committerTor Arne Vestbø <tor.arne.vestbo@qt.io>2019-08-22 02:15:38 +0200
commite688e28ee5e154baa03dbafdad06f8db69ef880c (patch)
treef708c9875c612f3a04acb4a154fb49e93f150d4b /src/plugins/platforms/cocoa/qcocoawindow.mm
parentee82f866152a27ef7a0d69f3aa41608d4a058610 (diff)
macOS: Invalidate backingstore and trigger expose on color space changes
Fixes: QTBUG-77749 Change-Id: I677a71152e4a218c08d8863d4f886d158a79e809 Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io> Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
Diffstat (limited to 'src/plugins/platforms/cocoa/qcocoawindow.mm')
-rw-r--r--src/plugins/platforms/cocoa/qcocoawindow.mm11
1 files changed, 11 insertions, 0 deletions
diff --git a/src/plugins/platforms/cocoa/qcocoawindow.mm b/src/plugins/platforms/cocoa/qcocoawindow.mm
index d6f88b4f23..3008a056a2 100644
--- a/src/plugins/platforms/cocoa/qcocoawindow.mm
+++ b/src/plugins/platforms/cocoa/qcocoawindow.mm
@@ -1261,6 +1261,17 @@ void QCocoaWindow::windowDidChangeScreen()
currentScreen->requestUpdate();
}
}
+/*
+ The window's backing scale factor or color space has changed.
+*/
+void QCocoaWindow::windowDidChangeBackingProperties()
+{
+ // Ideally we would plumb this thought QPA in a way that lets clients
+ // invalidate their own caches, and recreate QBackingStore. For now we
+ // trigger an expose, and let QCocoaBackingStore deal with its own
+ // buffer invalidation.
+ [m_view setNeedsDisplay:YES];
+}
void QCocoaWindow::windowWillClose()
{