[RFC,weston,v2] libweston: Commit subsurfaces before committing root surface

Submitted by Philipp Kerling on March 6, 2018, 4:57 p.m.

Details

Message ID 20180306165715.28979-2-pkerling@casix.org
State New
Headers show
Series "libweston: Do not include subsurfaces with NULL buffer in bounding box" ( rev: 2 ) in Wayland

Not browsing as part of any series.

Commit Message

Philipp Kerling March 6, 2018, 4:57 p.m.
Committing the root surface triggers a commit of the xdg_surface state,
which might require the subsurface state already being applied (e.g.
when an xdg_toplevel needs to follow size constraints, the subsurfaces
must be in the right position and size at the time this is verified).
---
 libweston/compositor.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

Patch hide | download patch | download mbox

diff --git a/libweston/compositor.c b/libweston/compositor.c
index aec937bb..8589e390 100644
--- a/libweston/compositor.c
+++ b/libweston/compositor.c
@@ -3191,12 +3191,12 @@  surface_commit(struct wl_client *client, struct wl_resource *resource)
 		return;
 	}
 
-	weston_surface_commit(surface);
-
 	wl_list_for_each(sub, &surface->subsurface_list, parent_link) {
 		if (sub->surface != surface)
 			weston_subsurface_parent_commit(sub, 0);
 	}
+
+	weston_surface_commit(surface);
 }
 
 static void