diff options
author | Marius Vlad <marius.vlad@collabora.com> | 2019-12-26 10:40:01 +0200 |
---|---|---|
committer | Marius Vlad <marius.vlad@collabora.com> | 2020-01-30 01:02:34 +0200 |
commit | 0e47c84e348b651f474add5b81698a6ad032fe84 (patch) | |
tree | 4871fa99080b26540407b8acad4fc8e5f80b00b7 | |
parent | 2d7243208d3e455decd730e7e33ab2452b1a0508 (diff) |
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 <marius.vlad@collabora.com>
Change-Id: I3df276a2a72feade246332554df40b2fdc026258
-rw-r--r-- | src/layout.c | 20 |
1 files 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 <libweston-6/compositor.h> #include <libweston-6/libweston-desktop.h> +#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; |