Change weston_surface.resource to a wl_resource pointer.
This is the first in what will be a series of weston patches to convert
instances of wl_resource to pointers so we can make wl_resource opaque.
This patch handles weston_surface and should be the most invasive of the
entire series. I am sending this one out ahead of the rest for review.
Specifically, my machine is not set up to build XWayland so I have no
ability to test it fully. Could someone please test with XWayland and let
me know if this causes problems?
Because a surface may be created from XWayland, the resource may not always
exist. Therefore, a destroy signal was added to weston_surface and
everything used to listen to surface->resource.destroy_signal now listens
to surface->destroy_signal.
diff --git a/src/animation.c b/src/animation.c
index b9d0f8a..10ab583 100644
--- a/src/animation.c
+++ b/src/animation.c
@@ -188,7 +188,7 @@
weston_surface_animation_frame(&animation->animation, NULL, 0);
animation->listener.notify = handle_animation_surface_destroy;
- wl_signal_add(&surface->resource.destroy_signal, &animation->listener);
+ wl_signal_add(&surface->destroy_signal, &animation->listener);
wl_list_insert(&surface->output->animation_list,
&animation->animation.link);