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/compositor.h b/src/compositor.h
index 22700b7..c87d9f1 100644
--- a/src/compositor.h
+++ b/src/compositor.h
@@ -651,7 +651,8 @@
*/
struct weston_surface {
- struct wl_resource resource;
+ struct wl_resource *resource;
+ struct wl_signal destroy_signal;
struct weston_compositor *compositor;
pixman_region32_t clip;
pixman_region32_t damage;