diff --git a/src/common-imports.qml b/src/common-imports.qml index 4cf56f0..253a9c2 100644 --- a/src/common-imports.qml +++ b/src/common-imports.qml @@ -45,6 +45,7 @@ Item { Connections { target: qApp onForegroundWindowChanged: { + console.log("hep"); if (qApp.foregroundWindow == mainWindow.winId) { appLauncherAppLoader.source = mainWindow.appSource; @@ -59,6 +60,9 @@ Item { } Component.onCompleted: { appLauncherSplashLoader.sourceComponent = appLauncherSplashComponent; + console.log("setting source"); + appLauncherAppLoader.source = mainWindow.appSource; + } } diff --git a/src/launcherapp.cpp b/src/launcherapp.cpp index 8ca3fac..350cfee 100644 --- a/src/launcherapp.cpp +++ b/src/launcherapp.cpp @@ -79,10 +79,12 @@ LauncherApp::LauncherApp(int &argc, char **argv) : qInstallMsgHandler(messageHandler); +#if 0 int dummy; if(!XQueryExtension(QX11Info::display(), "XInputExtension", &xinputOpcode, &dummy, &dummy)) xinputOpcode = -1; +#endif // Brutal hack: MTF (underneath the input context somewhere) // registers a duplicate session on a default name (sucked from @@ -185,6 +187,7 @@ void LauncherApp::keyboardTimeout() emit dismissKeyboard(); } +#if 0 bool LauncherApp::x11EventFilter(XEvent *event) { Display *dpy = QX11Info::display(); @@ -288,6 +291,7 @@ bool LauncherApp::x11EventFilter(XEvent *event) return QApplication::x11EventFilter(event); } +#endif void LauncherApp::setOrientationLocked(bool locked) { @@ -310,7 +314,8 @@ namespace M { void LauncherApp::onOrientationChanged() { - int orientation = orientationSensor.reading()->orientation(); + //int orientation = orientationSensor.reading()->orientation(); + orientation = QOrientationReading::LeftUp; int qmlOrient = -1; M::OrientationAngle mtfOrient; @@ -363,6 +368,7 @@ void LauncherApp::setOrientationSensorOn(bool value) bool LauncherApp::isSystemModelDialog(unsigned target) { +#if 0 Atom actualType; int actualFormat; unsigned long numWindowItems, bytesLeft; @@ -384,6 +390,7 @@ bool LauncherApp::isSystemModelDialog(unsigned target) XFree(data); return true; } +#endif return false; } diff --git a/src/launcherapp.h b/src/launcherapp.h index 5b859a3..2b34842 100644 --- a/src/launcherapp.h +++ b/src/launcherapp.h @@ -47,6 +47,10 @@ public: return foregroundWindow; } + void gogogo() { + emit foregroundWindowChanged(); + } + bool getPreinit() { return preinit; } @@ -94,8 +98,10 @@ signals: void preinitChanged(); void splashImageChanged(); +#if 0 protected: virtual bool x11EventFilter(XEvent *event); +#endif private slots: void onOrientationChanged(); diff --git a/src/launcheratoms.cpp b/src/launcheratoms.cpp index 22c6bed..9ce18d9 100644 --- a/src/launcheratoms.cpp +++ b/src/launcheratoms.cpp @@ -14,6 +14,7 @@ #include "launcheratoms.h" +#if 0 static Atom appAtoms[ATOM_COUNT]; // Keep this in sync with the AtomType enum in atoms.h static const char *appAtomNames[ATOM_COUNT] = { @@ -39,3 +40,4 @@ Atom getAtom (AtomType type) { return appAtoms[type]; } +#endif diff --git a/src/launcherwindow.cpp b/src/launcherwindow.cpp index b82f894..2c666ef 100644 --- a/src/launcherwindow.cpp +++ b/src/launcherwindow.cpp @@ -206,6 +206,18 @@ void LauncherWindow::init(bool fullscreen, int width, int height, switchToGLRendering(); } +#if 1 + QGLFormat format = QGLFormat::defaultFormat(); + format.setSampleBuffers(false); + setViewport(new QGLWidget(format)); + + // each time we create a new viewport widget, we must redo our optimisations + setViewportUpdateMode(QGraphicsView::FullViewportUpdate); + viewport()->setAttribute(Qt::WA_OpaquePaintEvent); + viewport()->setAttribute(Qt::WA_NoSystemBackground); + m_usingGl = true; +#endif + setGeometry(QRect(0, 0, screenWidth, screenHeight)); connect(app, SIGNAL(foregroundWindowChanged()), this, SLOT(updateOrientationSensorOn())); @@ -300,9 +312,11 @@ void LauncherWindow::setActualOrientation(int orientation) return; } +#if 0 Atom orientationAtom = XInternAtom(QX11Info::display(), "_MEEGO_ORIENTATION", false); XChangeProperty(QX11Info::display(), winId(), orientationAtom, XA_CARDINAL, 32, PropModeReplace, (unsigned char*)&m_actualOrientation, 1); +#endif } bool LauncherWindow::event (QEvent * event) @@ -323,6 +337,7 @@ void LauncherWindow::setInhibitScreenSaver(bool inhibit) { m_inhibitScreenSaver = inhibit; +#if 0 Atom inhibitAtom = XInternAtom(QX11Info::display(), "_MEEGO_INHIBIT_SCREENSAVER", false); if (inhibit) { @@ -333,6 +348,7 @@ void LauncherWindow::setInhibitScreenSaver(bool inhibit) { XDeleteProperty(QX11Info::display(), winId(), inhibitAtom); } +#endif } void LauncherWindow::updateOrientationSensorOn() @@ -367,6 +383,10 @@ void LauncherWindow::switchToSoftwareRendering() void LauncherWindow::doSwitchToGLRendering() { + qDebug("gogogo"); + qobject_cast(qApp)->gogogo(); + +#if 0 QGLFormat format = QGLFormat::defaultFormat(); format.setSampleBuffers(false); setViewport(new QGLWidget(format)); @@ -376,6 +396,7 @@ void LauncherWindow::doSwitchToGLRendering() viewport()->setAttribute(Qt::WA_OpaquePaintEvent); viewport()->setAttribute(Qt::WA_NoSystemBackground); m_usingGl = true; +#endif } void LauncherWindow::localeChanged() @@ -460,6 +481,8 @@ void LauncherWindow::loadScene() { LauncherApp *app = static_cast(qApp); + qDebug("loadScene"); + // This will trigger the stem cell to load the target // app source, and then delete the splash emit appSourceChanged(); diff --git a/src/meegoqmllauncher.cpp b/src/meegoqmllauncher.cpp index 67c250f..4fbf409 100644 --- a/src/meegoqmllauncher.cpp +++ b/src/meegoqmllauncher.cpp @@ -66,9 +66,10 @@ void MeeGoQMLLauncher::prepareForLaunch() fakeArgv[i] = const_cast(emptyString); } +#if 0 // Fix for BMC #17521 XInitThreads(); - +#endif QSettings i18n(QDir::homePath() + "/.config/sysconfig/i18n", QSettings::NativeFormat); @@ -83,8 +84,10 @@ void MeeGoQMLLauncher::prepareForLaunch() launcherApp->setApplicationName(appName); launcherApp->setPreinit(true); +#if 0 // Set up X stuff initAtoms(); +#endif launcherWindow = new LauncherWindow(fullscreen, width, height, opengl);