From 21d511e50fd3262b591eac2f8dd0c63ee59528ec Mon Sep 17 00:00:00 2001 From: "Jasper St. Pierre" Date: Tue, 15 Oct 2013 23:53:59 -0400 Subject: [PATCH] wayland: Remove meta_wayland_pointer_set_current It's unused. The current field is filled in by meta_wayland_seat_repick. --- src/wayland/meta-wayland-pointer.c | 26 -------------------------- src/wayland/meta-wayland-pointer.h | 5 ----- 2 files changed, 31 deletions(-) diff --git a/src/wayland/meta-wayland-pointer.c b/src/wayland/meta-wayland-pointer.c index 50620a88f..2ec8c75d5 100644 --- a/src/wayland/meta-wayland-pointer.c +++ b/src/wayland/meta-wayland-pointer.c @@ -385,32 +385,6 @@ meta_wayland_pointer_end_grab (MetaWaylandPointer *pointer) interface->focus (pointer->grab, pointer->current, NULL); } -static void -current_surface_destroy (struct wl_listener *listener, void *data) -{ - MetaWaylandPointer *pointer = - wl_container_of (listener, pointer, current_listener); - - pointer->current = NULL; -} - -void -meta_wayland_pointer_set_current (MetaWaylandPointer *pointer, - MetaWaylandSurface *surface) -{ - if (pointer->current) - wl_list_remove (&pointer->current_listener.link); - - pointer->current = surface; - - if (!surface) - return; - - wl_resource_add_destroy_listener (surface->resource, - &pointer->current_listener); - pointer->current_listener.notify = current_surface_destroy; -} - static void modal_focus (MetaWaylandPointerGrab *grab, MetaWaylandSurface *surface, diff --git a/src/wayland/meta-wayland-pointer.h b/src/wayland/meta-wayland-pointer.h index 53e59f344..e25b0082f 100644 --- a/src/wayland/meta-wayland-pointer.h +++ b/src/wayland/meta-wayland-pointer.h @@ -62,7 +62,6 @@ struct _MetaWaylandPointer wl_fixed_t x, y; /* TODO: remove, use ClutterInputDevice instead */ MetaWaylandSurface *current; - struct wl_listener current_listener; wl_fixed_t current_x, current_y; guint32 button_count; @@ -97,10 +96,6 @@ gboolean meta_wayland_pointer_start_popup_grab (MetaWaylandPointer *pointer, MetaWaylandSurface *popup); -void -meta_wayland_pointer_set_current (MetaWaylandPointer *pointer, - MetaWaylandSurface *surface); - void meta_wayland_pointer_get_relative_coordinates (MetaWaylandPointer *pointer, MetaWaylandSurface *surface,