@@ -92,6 +92,16 @@ int startShell(int argc, const char** argv, void* server)
92 view->setFlags(Qt::FramelessWindowHint);
92 view->setFlags(Qt::FramelessWindowHint);
95+ const QByteArray orientation = qgetenv("NATIVE_ORIENTATION");
96+ Qt::ScreenOrientation orientationAngle = Qt::PortraitOrientation;
97+ if (orientation == "landscape") {
98+ orientationAngle = Qt::LandscapeOrientation;
99+ } else if (!orientation.isEmpty() && orientation != "portrait") {
100+ qDebug() << "Unknown NATIVE_ORIENTATION setting, ignoring";
103+ view->rootContext()->setContextProperty("nativeOrientation", orientationAngle);
95 // You will need this if you want to interact with touch-only components using a mouse
105 // You will need this if you want to interact with touch-only components using a mouse
96 // Needed only when manually testing on a desktop.
106 // Needed only when manually testing on a desktop.
97 MouseTouchAdaptor *mouseTouchAdaptor = 0;
107 MouseTouchAdaptor *mouseTouchAdaptor = 0;
@@ -109,7 +119,7 @@ int startShell(int argc, const char** argv, void* server)
109 nativeInterface->setProperty("ubuntuSessionType", 1);
119 nativeInterface->setProperty("ubuntuSessionType", 1);
110 view->setProperty("role", 2); // INDICATOR_ACTOR_ROLE
120 view->setProperty("role", 2); // INDICATOR_ACTOR_ROLE
112− QUrl source(::qmlDirectory()+"Shell.qml");
122+ QUrl source(::qmlDirectory()+"ShellOrientator.qml");
113 prependImportPaths(view->engine(), ::overrideImportPaths());
123 prependImportPaths(view->engine(), ::overrideImportPaths());
114 appendImportPaths(view->engine(), ::fallbackImportPaths());
124 appendImportPaths(view->engine(), ::fallbackImportPaths());