[mutter/wayland] pointer: Remove focus listener
- From: Jasper St. Pierre <jstpierre src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [mutter/wayland] pointer: Remove focus listener
- Date: Wed, 20 Nov 2013 01:35:12 +0000 (UTC)
commit a8ac2cc27543ef4afe762e8a0675cceef7afdf91
Author: Jasper St. Pierre <jstpierre mecheye net>
Date: Tue Nov 19 20:16:28 2013 -0500
pointer: Remove focus listener
It's added too late to matter -- by the time we've destroyed the
resource, we've already repicked and re-set the focus.
src/wayland/meta-wayland-pointer.c | 17 -----------------
src/wayland/meta-wayland-pointer.h | 1 -
2 files changed, 0 insertions(+), 18 deletions(-)
---
diff --git a/src/wayland/meta-wayland-pointer.c b/src/wayland/meta-wayland-pointer.c
index 9fb19bf..beb85c8 100644
--- a/src/wayland/meta-wayland-pointer.c
+++ b/src/wayland/meta-wayland-pointer.c
@@ -64,16 +64,6 @@ meta_wayland_pointer_get_seat (MetaWaylandPointer *pointer)
}
static void
-lose_pointer_focus (struct wl_listener *listener, void *data)
-{
- MetaWaylandPointer *pointer =
- wl_container_of (listener, pointer, focus_listener);
-
- pointer->focus_resource = NULL;
- pointer->focus = NULL;
-}
-
-static void
default_grab_focus (MetaWaylandPointerGrab *grab,
MetaWaylandSurface *surface,
const ClutterEvent *event)
@@ -267,7 +257,6 @@ meta_wayland_pointer_init (MetaWaylandPointer *pointer,
memset (pointer, 0, sizeof *pointer);
wl_list_init (&pointer->resource_list);
- pointer->focus_listener.notify = lose_pointer_focus;
pointer->default_grab.interface = &default_pointer_grab_interface;
pointer->default_grab.pointer = pointer;
pointer->grab = &pointer->default_grab;
@@ -287,10 +276,6 @@ meta_wayland_pointer_init (MetaWaylandPointer *pointer,
void
meta_wayland_pointer_release (MetaWaylandPointer *pointer)
{
- /* XXX: What about pointer->resource_list? */
- if (pointer->focus_resource)
- wl_list_remove (&pointer->focus_listener.link);
-
pointer->focus = NULL;
pointer->focus_resource = NULL;
}
@@ -325,7 +310,6 @@ meta_wayland_pointer_set_focus (MetaWaylandPointer *pointer,
struct wl_display *display = wl_client_get_display (client);
serial = wl_display_next_serial (display);
wl_pointer_send_leave (resource, serial, pointer->focus->resource);
- wl_list_remove (&pointer->focus_listener.link);
}
resource = find_resource_for_surface (&pointer->resource_list, surface);
@@ -359,7 +343,6 @@ meta_wayland_pointer_set_focus (MetaWaylandPointer *pointer,
wl_fixed_to_int (pointer->x),
wl_fixed_to_int (pointer->y));
wl_pointer_send_enter (resource, serial, surface->resource, sx, sy);
- wl_resource_add_destroy_listener (resource, &pointer->focus_listener);
pointer->focus_serial = serial;
}
diff --git a/src/wayland/meta-wayland-pointer.h b/src/wayland/meta-wayland-pointer.h
index 95a4b5e..a31d609 100644
--- a/src/wayland/meta-wayland-pointer.h
+++ b/src/wayland/meta-wayland-pointer.h
@@ -48,7 +48,6 @@ struct _MetaWaylandPointer
struct wl_list resource_list;
MetaWaylandSurface *focus;
struct wl_resource *focus_resource;
- struct wl_listener focus_listener;
guint32 focus_serial;
guint32 click_serial;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]