[mutter/wayland] pointer/keyboard: Do a series of renames to our listener as well



commit 515dc08a9762ae2d5ddf485cb25eab062a88bf77
Author: Jasper St. Pierre <jstpierre mecheye net>
Date:   Mon Feb 17 19:13:16 2014 -0500

    pointer/keyboard: Do a series of renames to our listener as well

 src/wayland/meta-wayland-keyboard.c |   13 ++++++-------
 src/wayland/meta-wayland-keyboard.h |    2 +-
 src/wayland/meta-wayland-pointer.c  |   13 ++++++-------
 src/wayland/meta-wayland-pointer.h  |    2 +-
 4 files changed, 14 insertions(+), 16 deletions(-)
---
diff --git a/src/wayland/meta-wayland-keyboard.c b/src/wayland/meta-wayland-keyboard.c
index 3829222..3c4d1ee 100644
--- a/src/wayland/meta-wayland-keyboard.c
+++ b/src/wayland/meta-wayland-keyboard.c
@@ -222,10 +222,9 @@ err_keymap_str:
 }
 
 static void
-lose_keyboard_focus (struct wl_listener *listener, void *data)
+keyboard_handle_focus_surface_destroy (struct wl_listener *listener, void *data)
 {
-  MetaWaylandKeyboard *keyboard =
-    wl_container_of (listener, keyboard, focus_listener);
+  MetaWaylandKeyboard *keyboard = wl_container_of (listener, keyboard, focus_surface_listener);
 
   keyboard->focus_resource = NULL;
   keyboard->focus = NULL;
@@ -340,7 +339,7 @@ meta_wayland_keyboard_init (MetaWaylandKeyboard *keyboard,
 
   wl_list_init (&keyboard->resource_list);
   wl_array_init (&keyboard->keys);
-  keyboard->focus_listener.notify = lose_keyboard_focus;
+  keyboard->focus_surface_listener.notify = keyboard_handle_focus_surface_destroy;
   keyboard->default_grab.interface = &default_keyboard_grab_interface;
   keyboard->default_grab.keyboard = keyboard;
   keyboard->grab = &keyboard->default_grab;
@@ -522,7 +521,7 @@ meta_wayland_keyboard_set_focus (MetaWaylandKeyboard *keyboard,
       struct wl_display *display = wl_client_get_display (client);
       serial = wl_display_next_serial (display);
       wl_keyboard_send_leave (resource, serial, keyboard->focus->resource);
-      wl_list_remove (&keyboard->focus_listener.link);
+      wl_list_remove (&keyboard->focus_surface_listener.link);
 
       meta_wayland_surface_focused_unset (keyboard->focus);
     }
@@ -557,7 +556,7 @@ meta_wayland_keyboard_set_focus (MetaWaylandKeyboard *keyboard,
          wl_keyboard_send_enter (resource, serial, surface->resource,
                                  &keyboard->keys);
        }
-      wl_resource_add_destroy_listener (resource, &keyboard->focus_listener);
+      wl_resource_add_destroy_listener (resource, &keyboard->focus_surface_listener);
       keyboard->focus_serial = serial;
 
       meta_wayland_surface_focused_set (surface);
@@ -591,7 +590,7 @@ meta_wayland_keyboard_release (MetaWaylandKeyboard *keyboard)
 
   /* XXX: What about keyboard->resource_list? */
   if (keyboard->focus_resource)
-    wl_list_remove (&keyboard->focus_listener.link);
+    wl_list_remove (&keyboard->focus_surface_listener.link);
   wl_array_release (&keyboard->keys);
 }
 
diff --git a/src/wayland/meta-wayland-keyboard.h b/src/wayland/meta-wayland-keyboard.h
index 4354faf..d528073 100644
--- a/src/wayland/meta-wayland-keyboard.h
+++ b/src/wayland/meta-wayland-keyboard.h
@@ -94,7 +94,7 @@ struct _MetaWaylandKeyboard
   struct wl_list resource_list;
   MetaWaylandSurface *focus;
   struct wl_resource *focus_resource;
-  struct wl_listener focus_listener;
+  struct wl_listener focus_surface_listener;
   uint32_t focus_serial;
 
   MetaWaylandKeyboardGrab *grab;
diff --git a/src/wayland/meta-wayland-pointer.c b/src/wayland/meta-wayland-pointer.c
index ca65ece..a0ab56a 100644
--- a/src/wayland/meta-wayland-pointer.c
+++ b/src/wayland/meta-wayland-pointer.c
@@ -64,10 +64,9 @@ meta_wayland_pointer_get_seat (MetaWaylandPointer *pointer)
 }
 
 static void
-lose_pointer_focus (struct wl_listener *listener, void *data)
+pointer_handle_focus_surface_destroy (struct wl_listener *listener, void *data)
 {
-  MetaWaylandPointer *pointer =
-    wl_container_of (listener, pointer, focus_listener);
+  MetaWaylandPointer *pointer = wl_container_of (listener, pointer, focus_surface_listener);
 
   pointer->focus_resource = NULL;
   pointer->focus = NULL;
@@ -267,7 +266,7 @@ 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->focus_surface_listener.notify = pointer_handle_focus_surface_destroy;
   pointer->default_grab.interface = &default_pointer_grab_interface;
   pointer->default_grab.pointer = pointer;
   pointer->grab = &pointer->default_grab;
@@ -289,7 +288,7 @@ meta_wayland_pointer_release (MetaWaylandPointer *pointer)
 {
   /* XXX: What about pointer->resource_list? */
   if (pointer->focus_resource)
-    wl_list_remove (&pointer->focus_listener.link);
+    wl_list_remove (&pointer->focus_surface_listener.link);
 
   pointer->focus = NULL;
   pointer->focus_resource = NULL;
@@ -332,7 +331,7 @@ meta_wayland_pointer_set_focus (MetaWaylandPointer *pointer,
           wl_pointer_send_leave (resource, serial, pointer->focus->resource);
         }
 
-      wl_list_remove (&pointer->focus_listener.link);
+      wl_list_remove (&pointer->focus_surface_listener.link);
     }
 
   resource = find_resource_for_surface (&pointer->resource_list, surface);
@@ -365,7 +364,7 @@ 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);
+      wl_resource_add_destroy_listener (resource, &pointer->focus_surface_listener);
       pointer->focus_serial = serial;
     }
 
diff --git a/src/wayland/meta-wayland-pointer.h b/src/wayland/meta-wayland-pointer.h
index 95a4b5e..d753d5f 100644
--- a/src/wayland/meta-wayland-pointer.h
+++ b/src/wayland/meta-wayland-pointer.h
@@ -48,7 +48,7 @@ struct _MetaWaylandPointer
   struct wl_list resource_list;
   MetaWaylandSurface *focus;
   struct wl_resource *focus_resource;
-  struct wl_listener focus_listener;
+  struct wl_listener focus_surface_listener;
   guint32 focus_serial;
   guint32 click_serial;
 


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]