diff options
author | Kevin Krammer <kevin.krammer.qnx@kdab.com> | 2012-04-03 11:15:39 +0200 |
---|---|---|
committer | Qt by Nokia <qt-info@nokia.com> | 2012-04-03 12:45:46 +0200 |
commit | 45b7b0599cd1ebdfe17487215b36ff766068f0e8 (patch) | |
tree | 36260f5385c9e34a5196899eb442c65a0f0cdcef /src/plugins/platforms/qnx/qqnxnavigatoreventhandler.cpp | |
parent | b4ec80ac876d830f5a706afed2c0527ce79d48e0 (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/qqnxnavigatoreventhandler.cpp')
-rw-r--r-- | src/plugins/platforms/qnx/qqnxnavigatoreventhandler.cpp | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/src/plugins/platforms/qnx/qqnxnavigatoreventhandler.cpp b/src/plugins/platforms/qnx/qqnxnavigatoreventhandler.cpp index 4db86cb5cf..9527a57ca3 100644 --- a/src/plugins/platforms/qnx/qqnxnavigatoreventhandler.cpp +++ b/src/plugins/platforms/qnx/qqnxnavigatoreventhandler.cpp @@ -40,7 +40,6 @@ ****************************************************************************/ #include "qqnxnavigatoreventhandler.h" -#include "qqnxscreen.h" #include <QtGui/QGuiApplication> #include <QtGui/QWindow> @@ -61,8 +60,8 @@ static const char *navigatorControlPath = "/pps/services/navigator/control"; static const int ppsBufferSize = 4096; -QQnxNavigatorEventHandler::QQnxNavigatorEventHandler(QQnxScreen& primaryScreen) - : m_primaryScreen(primaryScreen), +QQnxNavigatorEventHandler::QQnxNavigatorEventHandler(QObject *parent) + : QObject(parent), m_fd(-1), m_readNotifier(0) { @@ -202,8 +201,7 @@ void QQnxNavigatorEventHandler::handleMessage(const QByteArray &msg, const QByte #if defined(QQNXNAVIGATOREVENTHANDLER_DEBUG) qDebug() << "PPS: orientation, o=" << dat; #endif - m_primaryScreen.setRotation( dat.toInt() ); - QWindowSystemInterface::handleScreenGeometryChange(0, m_primaryScreen.geometry()); + Q_EMIT rotationChanged(dat.toInt()); replyPPS(msg, id, ""); } else if (msg == "SWIPE_DOWN") { |