diff options
author | Pekka Paalanen <pekka.paalanen@collabora.co.uk> | 2015-04-17 14:23:38 +0300 |
---|---|---|
committer | Pekka Paalanen <pekka.paalanen@collabora.co.uk> | 2015-04-30 14:51:40 +0300 |
commit | ca79076b03459db80f8f9470fb2d636c01e37953 (patch) | |
tree | 3cf5631e00443d87a437f6aa8a7bc8d9f5b1a806 | |
parent | 08d3fb762527b15b33c3e63cc7ccea45fff9acfe (diff) | |
download | weston-ca79076b03459db80f8f9470fb2d636c01e37953.tar.gz weston-ca79076b03459db80f8f9470fb2d636c01e37953.tar.bz2 weston-ca79076b03459db80f8f9470fb2d636c01e37953.zip |
compositor: change weston_surface::destroy_signal argument
Pass 'this' weston_surface as the data argument to
weston_surface::destroy_signal listeners. The old &surface->resource was
really just an offsetted pointer to the weston_surface anyway. And,
because 'resource' happened to be the first member in struct weston_surface,
it was actually 'this' weston_surface.
The argument type was accidentally changed in commit
26ed73cee858956f6af07c3e4bb49b5514f17b8b from wl_resource* to
wl_resource**.
Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
-rw-r--r-- | src/compositor.c | 6 | ||||
-rw-r--r-- | src/compositor.h | 2 |
2 files changed, 4 insertions, 4 deletions
diff --git a/src/compositor.c b/src/compositor.c index c94f00ff..1c062651 100644 --- a/src/compositor.c +++ b/src/compositor.c @@ -1876,7 +1876,7 @@ weston_surface_destroy(struct weston_surface *surface) assert(surface->resource == NULL); - wl_signal_emit(&surface->destroy_signal, &surface->resource); + wl_signal_emit(&surface->destroy_signal, surface); assert(wl_list_empty(&surface->subsurface_list_pending)); assert(wl_list_empty(&surface->subsurface_list)); @@ -3483,7 +3483,7 @@ subsurface_handle_surface_destroy(struct wl_listener *listener, void *data) struct weston_subsurface *sub = container_of(listener, struct weston_subsurface, surface_destroy_listener); - assert(data == &sub->surface->resource); + assert(data == sub->surface); /* The protocol object (wl_resource) is left inert. */ if (sub->resource) @@ -3498,7 +3498,7 @@ subsurface_handle_parent_destroy(struct wl_listener *listener, void *data) struct weston_subsurface *sub = container_of(listener, struct weston_subsurface, parent_destroy_listener); - assert(data == &sub->parent->resource); + assert(data == sub->parent); assert(sub->surface != sub->parent); if (weston_surface_is_mapped(sub->surface)) diff --git a/src/compositor.h b/src/compositor.h index 5f49237d..31ef5c7b 100644 --- a/src/compositor.h +++ b/src/compositor.h @@ -883,7 +883,7 @@ struct weston_surface_state { struct weston_surface { struct wl_resource *resource; - struct wl_signal destroy_signal; + struct wl_signal destroy_signal; /* callback argument: this surface */ struct weston_compositor *compositor; /** Damage in local coordinates from the client, for tex upload. */ |