summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMarius Vlad <marius.vlad@collabora.com>2020-06-03 17:52:07 +0300
committerMarius Vlad <marius.vlad@collabora.com>2020-06-15 14:46:27 +0300
commit7536014f86a169ac6a021ef83e79eeb1cfb77b07 (patch)
tree0a0c58c833ce51ea4c5826311800e7459b0d17b9
parent9af061296dbe0eb542567d0eb991474948933e27 (diff)
main, layout: Minor clean-ups and added some further logging
Identifies the output being used, and removes the need to have the macro set. At the moment purely informative, but might be needed in case of debugging. Bug-AGL: SPEC-3280 Signed-off-by: Marius Vlad <marius.vlad@collabora.com> Change-Id: I7bdb49e7f97ce49afb035ee7b089094fc4aad3a2
-rw-r--r--src/layout.c41
-rw-r--r--src/main.c3
2 files changed, 14 insertions, 30 deletions
diff --git a/src/layout.c b/src/layout.c
index ea1e684..0b8858d 100644
--- a/src/layout.c
+++ b/src/layout.c
@@ -77,10 +77,8 @@ 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
+ weston_log("(background) position view %p, x %d, y %d, on output %s\n", view,
+ woutput->x, woutput->y, output->name);
view->is_mapped = true;
view->surface->is_mapped = true;
@@ -106,10 +104,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("(panel) 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;
@@ -134,33 +132,16 @@ 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
-
- /* this is necessary for cases we already mapped it desktop_committed()
- * but we not running the older qtwayland, so we still have a chance
- * for this to run at the next test */
- if (view->surface->is_mapped) {
- weston_layer_entry_remove(&view->layer_link);
-
- view->is_mapped = false;
- view->surface->is_mapped = false;
- }
-
- /* give ivi_layout_panel_committed() a chance to map the view/surface
- * instead */
- if ((geom.width == geom.height && geom.width == 0) &&
- (geom.x == geom.y && geom.x == 0) &&
- panel->panel.edge != AGL_SHELL_EDGE_TOP)
- return;
view->is_mapped = true;
view->surface->is_mapped = true;
-#ifdef AGL_COMP_DEBUG
- weston_log("panel type %d inited\n", panel->panel.edge);
-#endif
+
+ weston_log("panel type %d inited on output %s\n", panel->panel.edge,
+ output->name);
+
weston_layer_entry_insert(&ivi->panel.view_list, &view->layer_link);
}
@@ -250,9 +231,9 @@ ivi_layout_activate_complete(struct ivi_output *output,
surf->desktop.pending_output = NULL;
}
- weston_log("Activation completed for app_id %s, role %s\n",
+ weston_log("Activation completed for app_id %s, role %s, output %s\n",
weston_desktop_surface_get_app_id(surf->dsurface),
- ivi_layout_get_surface_role_name(surf));
+ ivi_layout_get_surface_role_name(surf), output->name);
}
static struct ivi_output *
diff --git a/src/main.c b/src/main.c
index 2571d17..613d6ee 100644
--- a/src/main.c
+++ b/src/main.c
@@ -101,6 +101,9 @@ ivi_output_configure_app_id(struct ivi_output *ivi_output)
"agl-shell-app-id",
&ivi_output->app_id,
NULL);
+
+ weston_log("Will place app_id %s on output %s\n",
+ ivi_output->app_id, ivi_output->name);
}
}