From 0e47c84e348b651f474add5b81698a6ad032fe84 Mon Sep 17 00:00:00 2001 From: Marius Vlad Date: Thu, 26 Dec 2019 10:40:01 +0200 Subject: [PATCH] layout: Print out when adding panels/background Useful information but only enabled by a macro. Quickly identify if the (client) shell has added panels/background. Bug-AGL: SPEC-3121 Signed-off-by: Marius Vlad Change-Id: I3df276a2a72feade246332554df40b2fdc026258 --- src/layout.c | 20 +++++++++++++++++--- 1 file changed, 17 insertions(+), 3 deletions(-) diff --git a/src/layout.c b/src/layout.c index 1088bd5..284c086 100644 --- a/src/layout.c +++ b/src/layout.c @@ -31,6 +31,8 @@ #include #include +#define AGL_COMP_DEBUG + static void ivi_background_init(struct ivi_compositor *ivi, struct ivi_output *output) { @@ -50,6 +52,11 @@ ivi_background_init(struct ivi_compositor *ivi, struct ivi_output *output) weston_view_set_output(view, woutput); weston_view_set_position(view, woutput->x, woutput->y); +#ifdef AGL_COMP_DEBUG + weston_log("(background) position view %p, x %d, y %d\n", view, + woutput->x, woutput->y); +#endif + view->is_mapped = true; view->surface->is_mapped = true; @@ -74,7 +81,10 @@ ivi_panel_init(struct ivi_compositor *ivi, struct ivi_output *output, dsurface = panel->dsurface; view = panel->view; geom = weston_desktop_surface_get_geometry(dsurface); - +#ifdef AGL_COMP_DEBUG + weston_log("geom.width %d, geom.height %d, geom.x %d, geom.y %d\n", + geom.width, geom.height, geom.x, geom.y); +#endif switch (panel->panel.edge) { case AGL_SHELL_EDGE_TOP: output->area.y += geom.height; @@ -99,6 +109,10 @@ ivi_panel_init(struct ivi_compositor *ivi, struct ivi_output *output, weston_view_set_output(view, woutput); weston_view_set_position(view, x, y); +#ifdef AGL_COMP_DEBUG + weston_log("(panel) edge %d position view %p, x %d, y %d\n", + panel->panel.edge, view, x, y); +#endif view->is_mapped = true; view->surface->is_mapped = true; @@ -214,9 +228,9 @@ ivi_layout_activate(struct ivi_output *output, const char *app_id) surf = ivi_find_app(ivi, app_id); if (!surf) return; - +#ifdef AGL_COMP_DEBUG weston_log("Found app_id %s\n", app_id); - +#endif if (surf == output->active) return; -- 2.16.6