From e02e15808052788ab2a5458694d7fdef752a3bd5 Mon Sep 17 00:00:00 2001 From: Samuel Iglesias Gonsalvez Date: Wed, 26 Jun 2013 10:38:13 +0200 Subject: [PATCH] compositor: fix surface list corruption Apparently, the surface list is corrupted and it finally produces a SIGSEGV. This is a workaround for the problem. Signed-off-by: Samuel Iglesias Gonsalvez --- src/compositor.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/compositor.c b/src/compositor.c index 43d8965..f4d3eac 100644 --- a/src/compositor.c +++ b/src/compositor.c @@ -937,6 +937,9 @@ weston_compositor_get_time(void) return tv.tv_sec * 1000 + tv.tv_usec / 1000; } +static void +weston_compositor_build_surface_list(struct weston_compositor *compositor); + WL_EXPORT struct weston_surface * weston_compositor_pick_surface(struct weston_compositor *compositor, wl_fixed_t x, wl_fixed_t y, @@ -944,6 +947,8 @@ weston_compositor_pick_surface(struct weston_compositor *compositor, { struct weston_surface *surface; + weston_compositor_build_surface_list(compositor); + wl_list_for_each(surface, &compositor->surface_list, link) { weston_surface_from_global_fixed(surface, x, y, sx, sy); if (pixman_region32_contains_point(&surface->input, -- 1.8.1.4