diff options
| author | Ander Conselvan de Oliveira <ander.conselvan.de.oliveira@intel.com> | 2012-03-27 17:36:35 +0300 |
|---|---|---|
| committer | Kristian Høgsberg <krh@bitplanet.net> | 2012-03-27 16:32:02 -0400 |
| commit | 897a4ec62d1ec531c9868bdef704500b1043c59b (patch) | |
| tree | 25fa33bd402fe7869e0d1833a883d790dc82ea54 /src/data-device.c | |
| parent | Remove wl_buffer.damage and simplify shm implementation (diff) | |
| download | wayland-897a4ec62d1ec531c9868bdef704500b1043c59b.tar wayland-897a4ec62d1ec531c9868bdef704500b1043c59b.tar.gz wayland-897a4ec62d1ec531c9868bdef704500b1043c59b.tar.bz2 wayland-897a4ec62d1ec531c9868bdef704500b1043c59b.tar.lz wayland-897a4ec62d1ec531c9868bdef704500b1043c59b.tar.xz wayland-897a4ec62d1ec531c9868bdef704500b1043c59b.tar.zst wayland-897a4ec62d1ec531c9868bdef704500b1043c59b.zip | |
data-device: notify the compositor about new drag icons
Let the compositor use a listener to be notified when a new drag icon
is set up.
Diffstat (limited to 'src/data-device.c')
| -rw-r--r-- | src/data-device.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/data-device.c b/src/data-device.c index 57f31ca..797fdd7 100644 --- a/src/data-device.c +++ b/src/data-device.c @@ -300,6 +300,7 @@ data_device_start_drag(struct wl_client *client, struct wl_resource *resource, struct wl_resource *icon_resource, uint32_t time) { struct wl_input_device *device = resource->data; + struct wl_listener *listener, *tmp; /* FIXME: Check that client has implicit grab on the origin * surface that matches the given time. */ @@ -318,6 +319,10 @@ data_device_start_drag(struct wl_client *client, struct wl_resource *resource, device->drag_icon_listener.func = destroy_data_device_icon; wl_list_insert(icon_resource->destroy_listener_list.prev, &device->drag_icon_listener.link); + + wl_list_for_each_safe(listener, tmp, + &device->drag_icon_listener_list, link) + listener->func(listener, icon_resource, time); } wl_input_device_start_pointer_grab(device, &device->drag_grab, time); |
