[PATCH weston 08/12] compositor: fix surface pointer cast
Pekka Paalanen
ppaalanen at gmail.com
Wed Oct 10 02:49:30 PDT 2012
In weston, the wl_resource:data field for a wl_surface object always
contains struct weston_surface *, never struct wl_surface *.
Even though this is just a cosmetic fix, it should reduce confusion.
Signed-off-by: Pekka Paalanen <ppaalanen at gmail.com>
---
src/compositor.c | 3 +--
1 files changed, 1 insertions(+), 2 deletions(-)
diff --git a/src/compositor.c b/src/compositor.c
index e2e264b..eb3e632 100644
--- a/src/compositor.c
+++ b/src/compositor.c
@@ -1985,8 +1985,7 @@ pointer_set_cursor(struct wl_client *client, struct wl_resource *resource,
struct weston_surface *surface = NULL;
if (surface_resource)
- surface = container_of(surface_resource->data,
- struct weston_surface, surface);
+ surface = surface_resource->data;
if (seat->seat.pointer->focus == NULL)
return;
--
1.7.8.6
More information about the wayland-devel
mailing list