From b12e35617c21a8997788ccfbb0b8fe29d426da56 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Kristian=20H=C3=B8gsberg?= Date: Sat, 21 Sep 2013 21:26:05 -0700 Subject: [PATCH] compositor: Unlink unmapped surface instead of rebuilding surface list When unmap and destroy a surface we need to make sure we don't pick it before we rebuild the new surface list. Currently we ensure this by rebuilding the surface list when destroying a surface, but just removing the surface should be enough. --- src/compositor.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/compositor.c b/src/compositor.c index e138e99..f94392c 100644 --- a/src/compositor.c +++ b/src/compositor.c @@ -1091,10 +1091,8 @@ weston_surface_destroy(struct weston_surface *surface) assert(wl_list_empty(&surface->subsurface_list_pending)); assert(wl_list_empty(&surface->subsurface_list)); - if (weston_surface_is_mapped(surface)) { + if (weston_surface_is_mapped(surface)) weston_surface_unmap(surface); - weston_compositor_build_surface_list(compositor); - } wl_list_for_each_safe(cb, next, &surface->pending.frame_callback_list, link) -- 2.7.4