compositor: Untangle surface/view is_mapped from output assignments
Currently, weston assumes a surface/view is mapped if
it has an output assigned. In a zero outputs scenario,
this isn't really desirable.
This patch introduces a new flag to weston_surface and
weston_view, which has to be set manually to indicate
that a surface/view is mapped.
v2:
- Remove usage of new flags from
weston_{view,surface}_is_mapped at this point. They
will be added after all the implicit mappings have
been introduced
- Unmap a surface before unmapping a view so the input
foci is cleaned up properly
- Remove implicit view mapping from view_list_add
- Cosmetic fixes
v3:
- Rebased to apply on git master
Signed-off-by: Armin Krezović <krezovic.armin@gmail.com>
Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
diff --git a/libweston/compositor.h b/libweston/compositor.h
index 93fbc97..557d2f5 100644
--- a/libweston/compositor.h
+++ b/libweston/compositor.h
@@ -966,6 +966,8 @@
/* Per-surface Presentation feedback flags, controlled by backend. */
uint32_t psf_flags;
+
+ bool is_mapped;
};
struct weston_surface_state {
@@ -1084,6 +1086,8 @@
const char *role_name;
struct weston_timeline_object timeline;
+
+ bool is_mapped;
};
struct weston_subsurface {