diff options
author | Tor Arne Vestbø <tor.arne.vestbo@qt.io> | 2018-03-20 17:31:43 +0100 |
---|---|---|
committer | Tor Arne Vestbø <tor.arne.vestbo@qt.io> | 2018-03-20 19:43:36 +0000 |
commit | 321c2d29fbebce63406e80da5d8f05e53cf34b23 (patch) | |
tree | a643a8709d5a4da8c680897408d17314eae717ed /src/plugins/platforms/cocoa/qcocoaintegration.mm | |
parent | ffc20153d1dc7872e1b1cb14ddb1c26c650a6955 (diff) |
macOS: Provide helper property for resolving the display ID of a screen
Change-Id: I144bd33a2c122d53ea1435a53483a3d8b46fd093
Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@qt.io>
Diffstat (limited to 'src/plugins/platforms/cocoa/qcocoaintegration.mm')
-rw-r--r-- | src/plugins/platforms/cocoa/qcocoaintegration.mm | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/plugins/platforms/cocoa/qcocoaintegration.mm b/src/plugins/platforms/cocoa/qcocoaintegration.mm index 6311c1f1f5..a50b9251b7 100644 --- a/src/plugins/platforms/cocoa/qcocoaintegration.mm +++ b/src/plugins/platforms/cocoa/qcocoaintegration.mm @@ -244,7 +244,7 @@ void QCocoaIntegration::updateScreens() uint screenCount = [screens count]; for (uint i = 0; i < screenCount; i++) { NSScreen* scr = [screens objectAtIndex:i]; - CGDirectDisplayID dpy = [[[scr deviceDescription] objectForKey:@"NSScreenNumber"] unsignedIntValue]; + CGDirectDisplayID dpy = scr.qt_displayId; // If this screen is a mirror and is not the primary one of the mirror set, ignore it. // Exception: The NSScreen API has been observed to a return a screen list with one // mirrored, non-primary screen when Qt is running as a startup item. Always use the |