Skip to content

Commit

Permalink
macOS: Respect QSurfaceFormat color space when creating NSWindow
Browse files Browse the repository at this point in the history
Task-number: QTBUG-47660
Change-Id: I90a2956bfaa52c361a3eba32f0ea19c0eca8c277
Reviewed-by: Simon Hausmann <[email protected]>
torarnv committed Jul 29, 2019
1 parent 56b1cb0 commit f4647b4
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/plugins/platforms/cocoa/qcocoawindow.mm
Original file line number Diff line number Diff line change
@@ -1647,6 +1647,9 @@ Posted whenever an NSView object that has attached surfaces (that is,
[nsWindow setDepthLimit:NSWindowDepthTwentyfourBitRGB];
}

if (format().colorSpace() == QSurfaceFormat::sRGBColorSpace)
nsWindow.colorSpace = NSColorSpace.sRGBColorSpace;

return nsWindow;
}

0 comments on commit f4647b4

Please sign in to comment.