diff options
author | Morten Johan Sørvig <morten.sorvig@qt.io> | 2016-10-20 03:31:06 -0700 |
---|---|---|
committer | Morten Johan Sørvig <morten.sorvig@qt.io> | 2016-10-24 10:48:26 +0000 |
commit | c12b6075d18280dc0405f3d19be4492ed1ebe560 (patch) | |
tree | 4f3f37d7bc7f6c7f6a5d5b18eb470637c736749c /src/plugins/platforms/cocoa/qcocoahelpers.mm | |
parent | bd603b2eb8ebafa9c74a060a9f539e778ad97c05 (diff) |
Update main/primary screen term usage
The first screen in the screens array is referred to
as the _primary_ screen in Apple documentation.
The main screen is the screen with the currently active
window.
Change-Id: I900a53e6bfb06ed9e42fba1e11d3a583777e9a1d
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@theqtcompany.com>
Diffstat (limited to 'src/plugins/platforms/cocoa/qcocoahelpers.mm')
-rw-r--r-- | src/plugins/platforms/cocoa/qcocoahelpers.mm | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/plugins/platforms/cocoa/qcocoahelpers.mm b/src/plugins/platforms/cocoa/qcocoahelpers.mm index c57567bdd6..f290275b5e 100644 --- a/src/plugins/platforms/cocoa/qcocoahelpers.mm +++ b/src/plugins/platforms/cocoa/qcocoahelpers.mm @@ -235,13 +235,13 @@ QString qt_mac_applicationName() return appName; } -int qt_mac_mainScreenHeight() +int qt_mac_primaryScreenHeight() { QMacAutoReleasePool pool; NSArray *screens = [NSScreen screens]; if ([screens count] > 0) { - // The first screen in the screens array is documented - // to have the (0,0) origin. + // The first screen in the screens array is documented to + // have the (0,0) origin and is designated the primary screen. NSRect screenFrame = [[screens objectAtIndex: 0] frame]; return screenFrame.size.height; } @@ -250,12 +250,12 @@ int qt_mac_mainScreenHeight() int qt_mac_flipYCoordinate(int y) { - return qt_mac_mainScreenHeight() - y; + return qt_mac_primaryScreenHeight() - y; } qreal qt_mac_flipYCoordinate(qreal y) { - return qt_mac_mainScreenHeight() - y; + return qt_mac_primaryScreenHeight() - y; } QPointF qt_mac_flipPoint(const NSPoint &p) |