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.
This commit is contained in:
Kristian Høgsberg 2013-05-07 15:30:49 -04:00
parent 7848bb687c
commit 624d8f2293
3 changed files with 2 additions and 21 deletions

View File

@ -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;

View File

@ -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,

View File

@ -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);