diff options
author | Jason Ekstrand <jason@jlekstrand.net> | 2013-06-06 22:34:41 -0500 |
---|---|---|
committer | Kristian Høgsberg <krh@bitplanet.net> | 2013-06-12 15:04:49 -0400 |
commit | 26ed73cee858956f6af07c3e4bb49b5514f17b8b (patch) | |
tree | 9103be3c5be45637f49fb58e10e6eb2839d47322 /src/data-device.c | |
parent | a2ce68fd0346b41b99c6dbbd3c33a5272ce31421 (diff) |
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.
Diffstat (limited to 'src/data-device.c')
-rw-r--r-- | src/data-device.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/src/data-device.c b/src/data-device.c index 0decbb98..06d24f1c 100644 --- a/src/data-device.c +++ b/src/data-device.c @@ -230,11 +230,12 @@ weston_drag_set_focus(struct weston_drag *drag, struct weston_surface *surface, if (!surface) return; - if (!drag->data_source && surface->resource.client != drag->client) + if (!drag->data_source && + wl_resource_get_client(surface->resource) != drag->client) return; resource = find_resource(&pointer->seat->drag_resource_list, - surface->resource.client); + wl_resource_get_client(surface->resource)); if (!resource) return; @@ -244,7 +245,7 @@ weston_drag_set_focus(struct weston_drag *drag, struct weston_surface *surface, if (drag->data_source) offer = wl_data_source_send_offer(drag->data_source, resource); - wl_data_device_send_enter(resource, serial, &surface->resource, + wl_data_device_send_enter(resource, serial, surface->resource, sx, sy, offer); drag->focus = surface; @@ -405,7 +406,7 @@ data_device_start_drag(struct wl_client *client, struct wl_resource *resource, if (icon) { drag->icon = icon; drag->icon_destroy_listener.notify = handle_drag_icon_destroy; - wl_signal_add(&icon->resource.destroy_signal, + wl_signal_add(&icon->destroy_signal, &drag->icon_destroy_listener); icon->configure = drag_surface_configure; |