[PATCH weston v6 44/73] libweston: log head detach on enabled output
Pekka Paalanen
ppaalanen at gmail.com
Fri Feb 16 14:57:29 UTC 2018
From: Pekka Paalanen <pekka.paalanen at collabora.co.uk>
Helps debugging.
Signed-off-by: Pekka Paalanen <pekka.paalanen at collabora.co.uk>
---
libweston/compositor.c | 11 ++++++++++-
1 file changed, 10 insertions(+), 1 deletion(-)
diff --git a/libweston/compositor.c b/libweston/compositor.c
index 0d2af676..362074b6 100644
--- a/libweston/compositor.c
+++ b/libweston/compositor.c
@@ -4693,6 +4693,7 @@ WL_EXPORT void
weston_head_detach(struct weston_head *head)
{
struct weston_output *output = head->output;
+ char *head_names;
wl_list_remove(&head->output_link);
wl_list_init(&head->output_link);
@@ -4707,8 +4708,16 @@ weston_head_detach(struct weston_head *head)
if (output->enabled) {
weston_head_remove_global(head);
- if (wl_list_empty(&output->head_list))
+ if (wl_list_empty(&output->head_list)) {
+ weston_log("Output '%s' no heads left, disabling.\n",
+ output->name);
weston_output_disable(output);
+ } else {
+ head_names = weston_output_create_heads_string(output);
+ weston_log("Output '%s' updated to have head(s) %s\n",
+ output->name, head_names);
+ free(head_names);
+ }
}
}
--
2.13.6
More information about the wayland-devel
mailing list