+ ilm_commitChanges();
+}
+
+void WindowManager::configureHomeScreenMainSurface(t_ilm_surface surface, t_ilm_int width, t_ilm_int height)
+{
+ // homescreen app always fullscreen in the back
+ ilm_surfaceSetDestinationRectangle(surface, 0, 0,
+ WINDOWMANAGER_HOMESCREEN_WIDTH,
+ WINDOWMANAGER_HOMESCREEN_HEIGHT);
+ ilm_surfaceSetSourceRectangle(surface, 0, 0, width, height);
+ ilm_surfaceSetOpacity(surface, 1.0);
+ ilm_surfaceSetVisibility(surface, ILM_TRUE);
+
+ ilm_commitChanges();
+}
+
+void WindowManager::configureAppSurface(pid_t pid, t_ilm_surface surface, t_ilm_int width, t_ilm_int height)
+{
+ /* Dirty hack! cut & paste from HomeScreen/src/layouthandler.cpp */
+ const int SCREEN_WIDTH = 1080;
+ const int SCREEN_HEIGHT = 1920;
+
+ const int TOPAREA_HEIGHT = 218;
+ const int TOPAREA_WIDTH = SCREEN_WIDTH;
+ const int TOPAREA_X = 0;
+ const int TOPAREA_Y = 0;
+ const int MEDIAAREA_HEIGHT = 215;
+ const int MEDIAAREA_WIDTH = SCREEN_WIDTH;
+ const int MEDIAAREA_X = 0;
+ const int MEDIAAREA_Y = SCREEN_HEIGHT - MEDIAAREA_HEIGHT;
+
+ ilm_surfaceSetDestinationRectangle(surface,
+ 0,
+ TOPAREA_HEIGHT,
+ SCREEN_WIDTH,
+ SCREEN_HEIGHT - TOPAREA_HEIGHT - MEDIAAREA_HEIGHT);
+ ilm_surfaceSetSourceRectangle(surface, 0, 0, width, height);
+ ilm_surfaceSetOpacity(surface, 1.0);
+ ilm_surfaceSetVisibility(surface, ILM_TRUE); /* Hack to avoid blank screen when switch apps */
+
+ ilm_commitChanges();
+}
+#endif
+
+void WindowManager::updateScreen()
+{
+ qDebug("-=[updateScreen]=-");
+
+#if 0
+//#ifdef HAVE_IVI_LAYERMANAGEMENT_API
+ if (-1 != m_currentLayout)
+ {
+ // hide all surfaces
+ for (int i = 0; i < m_appSurfaces.size(); ++i)
+ {
+ ilm_layerRemoveSurface(WINDOWMANAGER_LAYER_APPLICATIONS, m_appSurfaces.at(i));
+ //ilm_surfaceSetVisibility(m_appSurfaces.at(i), ILM_FALSE);
+ //ilm_surfaceSetOpacity(m_appSurfaces.at(i), 0.0);
+ ilm_commitChanges();
+ }
+
+ // find the current used layout
+ QList<Layout>::const_iterator ci = m_layouts.begin();