[mutter] pointer/keyboard: Rearrange slightly



commit 5f29b8c206208134a25d9f9e24d5f854ba751411
Author: Jasper St. Pierre <jstpierre mecheye net>
Date:   Fri Apr 18 10:15:40 2014 -0400

    pointer/keyboard: Rearrange slightly

 src/wayland/meta-wayland-keyboard.c |    7 ++++---
 src/wayland/meta-wayland-keyboard.h |    4 ++--
 src/wayland/meta-wayland-pointer.c  |   10 +++++-----
 src/wayland/meta-wayland-pointer.h  |   10 +++++-----
 4 files changed, 16 insertions(+), 15 deletions(-)
---
diff --git a/src/wayland/meta-wayland-keyboard.c b/src/wayland/meta-wayland-keyboard.c
index d4c43ad..5ac815c 100644
--- a/src/wayland/meta-wayland-keyboard.c
+++ b/src/wayland/meta-wayland-keyboard.c
@@ -271,11 +271,11 @@ meta_wayland_keyboard_init (MetaWaylandKeyboard *keyboard,
                             struct wl_display   *display)
 {
   memset (keyboard, 0, sizeof *keyboard);
-  keyboard->xkb_info.keymap_fd = -1;
+
+  keyboard->display = display;
 
   wl_list_init (&keyboard->resource_list);
   wl_list_init (&keyboard->focus_resource_list);
-  wl_array_init (&keyboard->keys);
 
   keyboard->focus_surface_listener.notify = keyboard_handle_focus_surface_destroy;
 
@@ -283,9 +283,10 @@ meta_wayland_keyboard_init (MetaWaylandKeyboard *keyboard,
   keyboard->default_grab.keyboard = keyboard;
   keyboard->grab = &keyboard->default_grab;
 
-  keyboard->display = display;
+  wl_array_init (&keyboard->keys);
 
   keyboard->xkb_context = xkb_context_new (0 /* flags */);
+  keyboard->xkb_info.keymap_fd = -1;
 
   /* Compute a default until gnome-settings-daemon starts and sets
      the appropriate values
diff --git a/src/wayland/meta-wayland-keyboard.h b/src/wayland/meta-wayland-keyboard.h
index 3f88b35..c935fdd 100644
--- a/src/wayland/meta-wayland-keyboard.h
+++ b/src/wayland/meta-wayland-keyboard.h
@@ -77,6 +77,8 @@ typedef struct
 
 struct _MetaWaylandKeyboard
 {
+  struct wl_display *display;
+
   struct wl_list resource_list;
   struct wl_list focus_resource_list;
 
@@ -92,8 +94,6 @@ struct _MetaWaylandKeyboard
 
   struct wl_array keys;
 
-  struct wl_display *display;
-
   struct xkb_context *xkb_context;
   MetaWaylandXkbInfo xkb_info;
 
diff --git a/src/wayland/meta-wayland-pointer.c b/src/wayland/meta-wayland-pointer.c
index 1e63bbe..d8f18e4 100644
--- a/src/wayland/meta-wayland-pointer.c
+++ b/src/wayland/meta-wayland-pointer.c
@@ -302,6 +302,11 @@ meta_wayland_pointer_init (MetaWaylandPointer *pointer,
 
   pointer->focus_surface_listener.notify = pointer_handle_focus_surface_destroy;
 
+  pointer->cursor_surface = NULL;
+  pointer->cursor_surface_destroy_listener.notify = pointer_handle_cursor_surface_destroy;
+  pointer->hotspot_x = 16;
+  pointer->hotspot_y = 16;
+
   pointer->default_grab.interface = &default_pointer_grab_interface;
   pointer->default_grab.pointer = pointer;
   pointer->grab = &pointer->default_grab;
@@ -323,11 +328,6 @@ meta_wayland_pointer_init (MetaWaylandPointer *pointer,
   clutter_input_device_get_coords (device, NULL, &current);
   pointer->x = wl_fixed_from_double (current.x);
   pointer->y = wl_fixed_from_double (current.y);
-
-  pointer->cursor_surface = NULL;
-  pointer->cursor_surface_destroy_listener.notify = pointer_handle_cursor_surface_destroy;
-  pointer->hotspot_x = 16;
-  pointer->hotspot_y = 16;
 }
 
 void
diff --git a/src/wayland/meta-wayland-pointer.h b/src/wayland/meta-wayland-pointer.h
index 32e9458..005c976 100644
--- a/src/wayland/meta-wayland-pointer.h
+++ b/src/wayland/meta-wayland-pointer.h
@@ -51,16 +51,16 @@ struct _MetaWaylandPointer
   struct wl_list resource_list;
   struct wl_list focus_resource_list;
 
-  MetaCursorTracker *cursor_tracker;
-  MetaWaylandSurface *cursor_surface;
-  struct wl_listener cursor_surface_destroy_listener;
-  int hotspot_x, hotspot_y;
-
   MetaWaylandSurface *focus_surface;
   struct wl_listener focus_surface_listener;
   guint32 focus_serial;
   guint32 click_serial;
 
+  MetaCursorTracker *cursor_tracker;
+  MetaWaylandSurface *cursor_surface;
+  struct wl_listener cursor_surface_destroy_listener;
+  int hotspot_x, hotspot_y;
+
   MetaWaylandPointerGrab *grab;
   MetaWaylandPointerGrab default_grab;
   wl_fixed_t grab_x, grab_y;


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