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.
This commit is contained in:
parent
d61dde12cb
commit
276df8f18d
@ -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));
|
||||
}
|
||||
}
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user