summaryrefslogtreecommitdiffstats
path: root/src/plugins/platforms/ios/qiosscreen.mm
diff options
context:
space:
mode:
authorTor Arne Vestbø <tor.arne.vestbo@digia.com>2015-01-16 18:26:16 +0100
committerTor Arne Vestbø <tor.arne.vestbo@theqtcompany.com>2015-01-23 03:05:16 +0100
commitcc0a114cd6653acedead994c0df83aa448a6f753 (patch)
tree72dce5c2c875a83ec8014bb1efb8bc9bb2e09bae /src/plugins/platforms/ios/qiosscreen.mm
parentbd26defd9bdddf8619a8d6ce1c6cb90b28c27d88 (diff)
iOS: Only use [UIDevice orientation] for the main/device screen
Auxiliary screens are always in their primaryOrientation. Change-Id: I078151ccbdb8a78eb095a05672f7804ab608ff24 Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@theqtcompany.com> Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@theqtcompany.com>
Diffstat (limited to 'src/plugins/platforms/ios/qiosscreen.mm')
-rw-r--r--src/plugins/platforms/ios/qiosscreen.mm4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/plugins/platforms/ios/qiosscreen.mm b/src/plugins/platforms/ios/qiosscreen.mm
index e9b2c546d4..a7d8149fb7 100644
--- a/src/plugins/platforms/ios/qiosscreen.mm
+++ b/src/plugins/platforms/ios/qiosscreen.mm
@@ -318,6 +318,10 @@ Qt::ScreenOrientation QIOSScreen::nativeOrientation() const
Qt::ScreenOrientation QIOSScreen::orientation() const
{
+ // Auxiliary screens are always the same orientation as their primary orientation
+ if (m_uiScreen != [UIScreen mainScreen])
+ return Qt::PrimaryOrientation;
+
UIDeviceOrientation deviceOrientation = [UIDevice currentDevice].orientation;
// At startup, iOS will report an unknown orientation for the device, even