mirror of
https://github.com/brl/mutter.git
synced 2024-11-26 01:50:42 -05:00
pointer/keyboard: Rearrange slightly
This commit is contained in:
parent
92340fd8da
commit
5f29b8c206
@ -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
|
||||
|
@ -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;
|
||||
|
||||
|
@ -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, ¤t);
|
||||
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
|
||||
|
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user