[mutter] keyboard/pointer: Make sure to move focused resources into the list
- From: Jasper St. Pierre <jstpierre src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [mutter] keyboard/pointer: Make sure to move focused resources into the list
- Date: Wed, 17 Sep 2014 03:26:00 +0000 (UTC)
commit 276df8f18dca85b1e8eb2b9377414ec4709ec74e
Author: Jasper St. Pierre <jstpierre mecheye net>
Date: Tue Sep 16 21:24:28 2014 -0600
keyboard/pointer: Make sure to move focused resources into the list
We only broadcast input to the focus_resource_list, so we need to make
sure it's put in the proper list on startup.
This fixes input not working for windows when they first appear.
Argh. There's always more stuff to fix with keyboard/pointer. Every
single time I think I've fixed it, more stuff pops up.
src/wayland/meta-wayland-keyboard.c | 10 ++++++++--
src/wayland/meta-wayland-pointer.c | 10 ++++++++--
2 files changed, 16 insertions(+), 4 deletions(-)
---
diff --git a/src/wayland/meta-wayland-keyboard.c b/src/wayland/meta-wayland-keyboard.c
index 0c6b88f..068ab71 100644
--- a/src/wayland/meta-wayland-keyboard.c
+++ b/src/wayland/meta-wayland-keyboard.c
@@ -636,7 +636,6 @@ meta_wayland_keyboard_create_new_resource (MetaWaylandKeyboard *keyboard,
cr = wl_resource_create (client, &wl_keyboard_interface, wl_resource_get_version (seat_resource), id);
wl_resource_set_implementation (cr, &keyboard_interface, keyboard, unbind_resource);
- wl_list_insert (&keyboard->resource_list, wl_resource_get_link (cr));
wl_keyboard_send_keymap (cr,
WL_KEYBOARD_KEYMAP_FORMAT_XKB_V1,
@@ -646,5 +645,12 @@ meta_wayland_keyboard_create_new_resource (MetaWaylandKeyboard *keyboard,
notify_key_repeat_for_resource (keyboard, cr);
if (keyboard->focus_surface && wl_resource_get_client (keyboard->focus_surface->resource) == client)
- broadcast_focus (keyboard, cr);
+ {
+ wl_list_insert (&keyboard->focus_resource_list, wl_resource_get_link (cr));
+ broadcast_focus (keyboard, cr);
+ }
+ else
+ {
+ wl_list_insert (&keyboard->resource_list, wl_resource_get_link (cr));
+ }
}
diff --git a/src/wayland/meta-wayland-pointer.c b/src/wayland/meta-wayland-pointer.c
index 7677ae4..ca1952a 100644
--- a/src/wayland/meta-wayland-pointer.c
+++ b/src/wayland/meta-wayland-pointer.c
@@ -817,10 +817,16 @@ meta_wayland_pointer_create_new_resource (MetaWaylandPointer *pointer,
cr = wl_resource_create (client, &wl_pointer_interface, wl_resource_get_version (seat_resource), id);
wl_resource_set_implementation (cr, &pointer_interface, pointer, unbind_resource);
- wl_list_insert (&pointer->resource_list, wl_resource_get_link (cr));
if (pointer->focus_surface && wl_resource_get_client (pointer->focus_surface->resource) == client)
- broadcast_focus (pointer, cr);
+ {
+ wl_list_insert (&pointer->focus_resource_list, wl_resource_get_link (cr));
+ broadcast_focus (pointer, cr);
+ }
+ else
+ {
+ wl_list_insert (&pointer->resource_list, wl_resource_get_link (cr));
+ }
}
gboolean
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]