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/qqnxintegration.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/qqnxintegration.cpp')
-rw-r--r-- | src/plugins/platforms/qnx/qqnxintegration.cpp | 24 |
1 files changed, 14 insertions, 10 deletions
diff --git a/src/plugins/platforms/qnx/qqnxintegration.cpp b/src/plugins/platforms/qnx/qqnxintegration.cpp index faec340347..687002db09 100644 --- a/src/plugins/platforms/qnx/qqnxintegration.cpp +++ b/src/plugins/platforms/qnx/qqnxintegration.cpp @@ -103,16 +103,6 @@ QQnxIntegration::QQnxIntegration() qFatal("QQnx: failed to connect to composition manager, errno=%d", errno); } - // Create displays for all possible screens (which may not be attached) - createDisplays(); - - // Initialize global OpenGL resources - QQnxGLContext::initialize(); - - // Create/start event thread - m_eventThread = new QQnxEventThread(m_screenContext, m_screenEventHandler); - m_eventThread->start(); - // Create/start navigator event handler // Not on BlackBerry, it has specialised event dispatcher which also handles navigator events #ifndef Q_OS_BLACKBERRY @@ -123,6 +113,16 @@ QQnxIntegration::QQnxIntegration() QMetaObject::invokeMethod(m_navigatorEventHandler, "start", Qt::QueuedConnection); #endif + // Create displays for all possible screens (which may not be attached) + createDisplays(); + + // Initialize global OpenGL resources + QQnxGLContext::initialize(); + + // Create/start event thread + m_eventThread = new QQnxEventThread(m_screenContext, m_screenEventHandler); + m_eventThread->start(); + // Create/start the keyboard class. m_virtualKeyboard = new QQnxVirtualKeyboard(); @@ -360,6 +360,10 @@ void QQnxIntegration::createDisplays() screen, SLOT(newWindowCreated(void *))); QObject::connect(m_screenEventHandler, SIGNAL(windowClosed(void *)), screen, SLOT(windowClosed(void *))); + +#ifndef Q_OS_BLACKBERRY + QObject::connect(m_navigatorEventHandler, SIGNAL(rotationChanged(int)), screen, SLOT(setRotation(int))); +#endif } } |