summaryrefslogtreecommitdiffstats
path: root/src/plugins/platforms/qnx/qqnxscreen.cpp
diff options
context:
space:
mode:
authorKevin Krammer <kevin.krammer.qnx@kdab.com>2012-04-03 11:15:39 +0200
committerQt by Nokia <qt-info@nokia.com>2012-04-03 12:45:46 +0200
commit45b7b0599cd1ebdfe17487215b36ff766068f0e8 (patch)
tree36260f5385c9e34a5196899eb442c65a0f0cdcef /src/plugins/platforms/qnx/qqnxscreen.cpp
parentb4ec80ac876d830f5a706afed2c0527ce79d48e0 (diff)
Move handling of rotation changes from event handler to screen
Have the navigator event handler emit the new rotation as a signal argument and let the screen class handle all parts of the change, i.e. also notifying the window system about the geometry change. This also allows to rotate all screens, not just the primary screen, if this should be necessary. Change-Id: I304a80232b84d2d9130e38e955d5a75b1ccad775 Reviewed-by: Thomas McGuire <thomas.mcguire@kdab.com> Reviewed-by: Sean Harmer <sean.harmer@kdab.com> Reviewed-by: Robin Burchell <robin+qt@viroteck.net>
Diffstat (limited to 'src/plugins/platforms/qnx/qqnxscreen.cpp')
-rw-r--r--src/plugins/platforms/qnx/qqnxscreen.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/plugins/platforms/qnx/qqnxscreen.cpp b/src/plugins/platforms/qnx/qqnxscreen.cpp
index 7ddef321ae..27c1357a87 100644
--- a/src/plugins/platforms/qnx/qqnxscreen.cpp
+++ b/src/plugins/platforms/qnx/qqnxscreen.cpp
@@ -190,6 +190,12 @@ void QQnxScreen::setRotation(int rotation)
// Save new rotation
m_currentRotation = rotation;
+
+ // TODO: check if other screens are supposed to rotate as well and/or whether this depends
+ // on if clone mode is being used.
+ // Rotating only the primary screen is what we had in the navigator event handler before refactoring
+ if (m_primaryScreen)
+ QWindowSystemInterface::handleScreenGeometryChange(screen(), m_currentGeometry);
}
}