QNX: Adjust rotation according to initial orientation
Task-number: QTBUG-29201 Change-Id: I37e82904e0f3d8b372b31ee7d1379e61c788c622 Reviewed-by: Thomas McGuire <thomas.mcguire@kdab.com> Reviewed-by: Kevin Krammer <kevin.krammer@kdab.com>
This commit is contained in:
parent
4d7f0ce8d0
commit
f0425e115e
@ -486,6 +486,7 @@ void QQnxIntegration::createDisplay(screen_display_t display, bool isPrimary)
|
|||||||
QQnxScreen *screen = new QQnxScreen(m_screenContext, display, isPrimary);
|
QQnxScreen *screen = new QQnxScreen(m_screenContext, display, isPrimary);
|
||||||
m_screens.append(screen);
|
m_screens.append(screen);
|
||||||
screenAdded(screen);
|
screenAdded(screen);
|
||||||
|
screen->adjustOrientation();
|
||||||
|
|
||||||
QObject::connect(m_screenEventHandler, SIGNAL(newWindowCreated(void*)),
|
QObject::connect(m_screenEventHandler, SIGNAL(newWindowCreated(void*)),
|
||||||
screen, SLOT(newWindowCreated(void*)));
|
screen, SLOT(newWindowCreated(void*)));
|
||||||
|
@ -498,6 +498,18 @@ void QQnxScreen::onWindowPost(QQnxWindow *window)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void QQnxScreen::adjustOrientation()
|
||||||
|
{
|
||||||
|
if (!m_primaryScreen)
|
||||||
|
return;
|
||||||
|
|
||||||
|
bool ok = false;
|
||||||
|
const int rotation = qgetenv("ORIENTATION").toInt(&ok);
|
||||||
|
|
||||||
|
if (ok)
|
||||||
|
setRotation(rotation);
|
||||||
|
}
|
||||||
|
|
||||||
QPlatformCursor * QQnxScreen::cursor() const
|
QPlatformCursor * QQnxScreen::cursor() const
|
||||||
{
|
{
|
||||||
return m_cursor;
|
return m_cursor;
|
||||||
|
@ -92,6 +92,7 @@ public:
|
|||||||
void updateHierarchy();
|
void updateHierarchy();
|
||||||
|
|
||||||
void onWindowPost(QQnxWindow *window);
|
void onWindowPost(QQnxWindow *window);
|
||||||
|
void adjustOrientation();
|
||||||
|
|
||||||
QSharedPointer<QQnxRootWindow> rootWindow() const;
|
QSharedPointer<QQnxRootWindow> rootWindow() const;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user