From 35b8f8c072b57cfa61e852978752be8fdbf428dc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jonas=20=C3=85dahl?= <jadahl@gmail.com> Date: Tue, 20 Sep 2016 16:59:52 +0800 Subject: [PATCH] wayland/keyboard: Initialize static state in GObject init func https://bugzilla.gnome.org/show_bug.cgi?id=771646 --- src/wayland/meta-wayland-keyboard.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/src/wayland/meta-wayland-keyboard.c b/src/wayland/meta-wayland-keyboard.c index 2b5e23cf0..fd3248395 100644 --- a/src/wayland/meta-wayland-keyboard.c +++ b/src/wayland/meta-wayland-keyboard.c @@ -611,12 +611,8 @@ meta_wayland_keyboard_enable (MetaWaylandKeyboard *keyboard) wl_list_init (&keyboard->resource_list); wl_list_init (&keyboard->focus_resource_list); - keyboard->focus_surface_listener.notify = keyboard_handle_focus_surface_destroy; - keyboard->xkb_info.keymap_fd = -1; - keyboard->default_grab.interface = &default_keyboard_grab_interface; - keyboard->default_grab.keyboard = keyboard; keyboard->grab = &keyboard->default_grab; keyboard->settings = g_settings_new ("org.gnome.desktop.peripherals.keyboard"); @@ -961,6 +957,11 @@ meta_wayland_keyboard_end_grab (MetaWaylandKeyboard *keyboard) static void meta_wayland_keyboard_init (MetaWaylandKeyboard *keyboard) { + keyboard->default_grab.interface = &default_keyboard_grab_interface; + keyboard->default_grab.keyboard = keyboard; + + keyboard->focus_surface_listener.notify = + keyboard_handle_focus_surface_destroy; } static void