+
+int WindowManager::homeScreenPid() const
+{
+ return m_homeScreenPid;
+}
+
+void WindowManager::setHomeScreenPid(int value)
+{
+ m_homeScreenPid = value;
+#ifdef __arm__
+ // maybe the HomeSceen app has already provided its surface.
+ // if so, shift it to the correct layer
+ // find the current used layout
+ QList<int>::iterator ci = m_surfaces.begin();
+
+ struct ilmSurfaceProperties surfaceProperties;
+ bool found = false;
+ while ((!found) && (ci != m_surfaces.constEnd()))
+ {
+ ilm_getPropertiesOfSurface(*ci, &surfaceProperties);
+ if (m_homeScreenPid == surfaceProperties.creatorPid)
+ {
+ qDebug("HomeScreen app detected");
+ m_homeScreenSurfaceId = *ci;
+ addSurfaceToLayer(*ci, WINDOWMANAGER_LAYER_HOMESCREEN);
+ m_surfaces.erase(ci);
+ found = true;
+ updateScreen();
+ }
+
+ ++ci;
+ }
+#endif
+
+ updateScreen();
+ dumpScene();
+}
+
+int WindowManager::layoutId() const
+{
+ return m_currentLayout;
+}
+
+QString WindowManager::layoutName() const
+{
+ QList<Layout>::const_iterator i = m_layouts.begin();
+
+ QString result = "not found";
+ while (i != m_layouts.constEnd())
+ {
+ if (i->id == m_currentLayout)
+ {
+ result = i->name;
+ }
+
+ ++i;
+ }
+
+ return result;
+}
+
+
+int WindowManager::addLayout(int layoutId, const QString &layoutName, const QList<LayoutArea> &surfaceAreas)