From e688e28ee5e154baa03dbafdad06f8db69ef880c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tor=20Arne=20Vestb=C3=B8?= Date: Wed, 21 Aug 2019 12:36:21 +0200 Subject: macOS: Invalidate backingstore and trigger expose on color space changes Fixes: QTBUG-77749 Change-Id: I677a71152e4a218c08d8863d4f886d158a79e809 Reviewed-by: Volker Hilsheimer Reviewed-by: Timur Pocheptsov --- src/plugins/platforms/cocoa/qcocoawindow.mm | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'src/plugins/platforms/cocoa/qcocoawindow.mm') 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() { -- cgit v1.2.3