summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKristian Høgsberg <krh@bitplanet.net>2013-05-07 15:30:49 -0400
committerKristian Høgsberg <krh@bitplanet.net>2013-05-07 20:46:04 -0400
commit624d8f22933cf43782fd73fc6b312827a65cf65a (patch)
tree955d9045d9e513f892b1372addd76f58e400c36a
parent7848bb687c3502417ba8dc380af6245c9418354b (diff)
data-device: Don't emit a signal for drag icon changes
The signal used to be in libwayland-server and the listener in weston, but now they're both in the same file, so lets stop using signal.
-rw-r--r--src/compositor.h3
-rw-r--r--src/data-device.c4
-rw-r--r--src/input.c16
3 files changed, 2 insertions, 21 deletions
diff --git a/src/compositor.h b/src/compositor.h
index c9500ae1..335f2ee7 100644
--- a/src/compositor.h
+++ b/src/compositor.h
@@ -476,12 +476,9 @@ struct weston_seat {
struct weston_surface *drag_surface;
struct wl_listener drag_surface_destroy_listener;
struct wl_listener drag_icon_listener;
- struct wl_signal drag_icon_signal;
uint32_t num_tp;
- struct wl_listener new_drag_icon_listener;
-
void (*led_update)(struct weston_seat *ws, enum weston_led leds);
struct weston_xkb_info xkb_info;
diff --git a/src/data-device.c b/src/data-device.c
index ad88439e..9352e45b 100644
--- a/src/data-device.c
+++ b/src/data-device.c
@@ -349,7 +349,7 @@ data_device_end_drag_grab(struct weston_seat *seat)
{
if (seat->drag_surface) {
seat->drag_surface = NULL;
- wl_signal_emit(&seat->drag_icon_signal, NULL);
+ weston_seat_update_drag_surface(seat, 0, 0);
wl_list_remove(&seat->drag_icon_listener.link);
}
@@ -451,7 +451,7 @@ data_device_start_drag(struct wl_client *client, struct wl_resource *resource,
seat->drag_icon_listener.notify = destroy_data_device_icon;
wl_signal_add(&icon_resource->destroy_signal,
&seat->drag_icon_listener);
- wl_signal_emit(&seat->drag_icon_signal, icon_resource);
+ weston_seat_update_drag_surface(seat, 0, 0);
}
weston_pointer_set_focus(seat->pointer, NULL,
diff --git a/src/input.c b/src/input.c
index d65ea0f1..753b6796 100644
--- a/src/input.c
+++ b/src/input.c
@@ -1309,17 +1309,6 @@ bind_seat(struct wl_client *client, void *data, uint32_t version, uint32_t id)
wl_seat_send_capabilities(resource, caps);
}
-static void
-device_handle_new_drag_icon(struct wl_listener *listener, void *data)
-{
- struct weston_seat *seat;
-
- seat = container_of(listener, struct weston_seat,
- new_drag_icon_listener);
-
- weston_seat_update_drag_surface(seat, 0, 0);
-}
-
int
weston_compositor_xkb_init(struct weston_compositor *ec,
struct xkb_rule_names *names)
@@ -1520,7 +1509,6 @@ weston_seat_init(struct weston_seat *seat, struct weston_compositor *ec)
wl_list_init(&seat->base_resource_list);
wl_signal_init(&seat->selection_signal);
wl_list_init(&seat->drag_resource_list);
- wl_signal_init(&seat->drag_icon_signal);
wl_signal_init(&seat->destroy_signal);
seat->has_pointer = 0;
@@ -1541,10 +1529,6 @@ weston_seat_init(struct weston_seat *seat, struct weston_compositor *ec)
wl_list_insert(ec->seat_list.prev, &seat->link);
- seat->new_drag_icon_listener.notify = device_handle_new_drag_icon;
- wl_signal_add(&seat->drag_icon_signal,
- &seat->new_drag_icon_listener);
-
clipboard_create(seat);
wl_signal_emit(&ec->seat_created_signal, seat);