From cc0a114cd6653acedead994c0df83aa448a6f753 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tor=20Arne=20Vestb=C3=B8?= Date: Fri, 16 Jan 2015 18:26:16 +0100 Subject: iOS: Only use [UIDevice orientation] for the main/device screen MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Auxiliary screens are always in their primaryOrientation. Change-Id: I078151ccbdb8a78eb095a05672f7804ab608ff24 Reviewed-by: Richard Moe Gustavsen Reviewed-by: Tor Arne Vestbø --- src/plugins/platforms/ios/qiosscreen.mm | 4 ++++ 1 file changed, 4 insertions(+) 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 -- cgit v1.2.3