summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--windowmanager/src/windowmanager.cpp33
-rw-r--r--windowmanager/src/windowmanager.hpp1
2 files changed, 14 insertions, 20 deletions
diff --git a/windowmanager/src/windowmanager.cpp b/windowmanager/src/windowmanager.cpp
index e7802ca..1f5e4c9 100644
--- a/windowmanager/src/windowmanager.cpp
+++ b/windowmanager/src/windowmanager.cpp
@@ -132,6 +132,15 @@ int WindowManager::getLayerRenderOrder(t_ilm_layer id_array[])
return j;
}
+
+void WindowManager::renderLayers()
+{
+ t_ilm_layer renderOrder[WINDOWMANAGER_LAYER_NUM];
+ int num_layers = getLayerRenderOrder(renderOrder);
+ qDebug("Screen render order %d, %d layers", m_screenId, num_layers);
+ ilm_displaySetRenderOrder(m_screenId, renderOrder, num_layers);
+ ilm_commitChanges();
+}
#endif
void WindowManager::dumpScene()
@@ -405,12 +414,7 @@ void WindowManager::updateScreen()
showAppLayer(m_pending_to_show);
} else {
// display layer render order
- t_ilm_layer renderOrder[WINDOWMANAGER_LAYER_NUM];
- int num_layers = getLayerRenderOrder(renderOrder);
-
- qDebug("Screen render order %d, %d layers", m_screenId, num_layers);
- ilm_displaySetRenderOrder(m_screenId, renderOrder, num_layers);
- ilm_commitChanges();
+ renderLayers();
}
#endif
}
@@ -700,11 +704,7 @@ void WindowManager::hideLayer(int layer)
/* clear pending flag */
m_pending_to_show = -1;
}
-
- t_ilm_layer renderOrder[WINDOWMANAGER_LAYER_NUM];
- int num_layers = getLayerRenderOrder(renderOrder);
- ilm_displaySetRenderOrder(m_screenId, renderOrder, num_layers);
- ilm_commitChanges();
+ renderLayers();
}
#endif
}
@@ -779,10 +779,7 @@ void WindowManager::showLayer(int layer)
m_showLayers[layer] = layer_id_array[layer];
- t_ilm_layer renderOrder[WINDOWMANAGER_LAYER_NUM];
- int num_layers = getLayerRenderOrder(renderOrder);
- ilm_displaySetRenderOrder(m_screenId, renderOrder, num_layers);
- ilm_commitChanges();
+ renderLayers();
}
#endif
}
@@ -820,10 +817,6 @@ void WindowManager::showAppLayer(int pid)
m_showLayers[2] = 0;
qDebug("No layer to show for app(pid=%d)", pid);
}
- t_ilm_layer renderOrder[WINDOWMANAGER_LAYER_NUM];
-
- int num_layers = getLayerRenderOrder(renderOrder);
- ilm_displaySetRenderOrder(m_screenId, renderOrder, num_layers);
- ilm_commitChanges();
+ renderLayers();
#endif
}
diff --git a/windowmanager/src/windowmanager.hpp b/windowmanager/src/windowmanager.hpp
index 89f255e..8b70349 100644
--- a/windowmanager/src/windowmanager.hpp
+++ b/windowmanager/src/windowmanager.hpp
@@ -66,6 +66,7 @@ private:
void configureHomeScreenMainSurface(const t_ilm_surface surface, const t_ilm_int width, const t_ilm_int height);
void configureAppSurface(const pid_t pid, const t_ilm_surface surface, const t_ilm_int width, const t_ilm_int height);
+ void renderLayers();
#endif
void updateScreen();