+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();
+}