1From 4f334a355f5064244c05071784ec234f9d4e872b Mon Sep 17 00:00:00 2001
2From: Jeffy Chen <jeffy.chen@rock-chips.com>
3Date: Mon, 8 Aug 2022 15:46:35 +0800
4Subject: [PATCH 75/92] HACK: compositor: Allow mapping bufferless subsurfaces
5
6The current qtwayland needs it.
7
8Signed-off-by: Jeffy Chen <jeffy.chen@rock-chips.com>
9---
10 libweston/compositor.c | 7 +++++++
11 1 file changed, 7 insertions(+)
12
13diff --git a/libweston/compositor.c b/libweston/compositor.c
14index a99c8b8..ca5e405 100644
15--- a/libweston/compositor.c
16+++ b/libweston/compositor.c
17@@ -4888,6 +4888,13 @@ subsurface_committed(struct weston_surface *surface, int32_t dx, int32_t dy)
18 		weston_surface_map(surface);
19 	}
20
21+	/**
22+	 * HACK: Allow mapping bufferless subsurfaces
23+	 * See: https://bugreports.qt.io/browse/QTBUG-86229
24+	 */
25+	if (!weston_surface_is_mapped(surface))
26+		weston_surface_map(surface);
27+
28 	/* Cannot call weston_view_update_transform() here, because that would
29 	 * call it also for the parent surface, which might not be mapped yet.
30 	 * That would lead to inconsistent state, where the window could never
31--
322.20.1
33
34