1From f1917a85b2bfc5deb240c68e30e0f48ba83b8ab0 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 76/93] 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 8252041..038c312 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