wayland: Fix setting keyboard/pointer focus for new clients
When we have a new client, we potentially set the focus on one of its surfaces when we map it but the client might not have called wl_seat.get_keyboard/pointer yet. When it finally calls get_keyboard/pointer we must then register its resource as the focus_resource which means that we can only return early if focus_resource is already set. https://bugzilla.gnome.org/show_bug.cgi?id=719725
This commit is contained in:
parent
3f022ca963
commit
461f74ef18
@ -501,7 +501,7 @@ meta_wayland_keyboard_set_focus (MetaWaylandKeyboard *keyboard,
|
||||
struct wl_resource *resource;
|
||||
uint32_t serial;
|
||||
|
||||
if (keyboard->focus == surface)
|
||||
if (keyboard->focus == surface && keyboard->focus_resource != NULL)
|
||||
return;
|
||||
|
||||
resource = keyboard->focus_resource;
|
||||
|
@ -303,7 +303,7 @@ meta_wayland_pointer_set_focus (MetaWaylandPointer *pointer,
|
||||
struct wl_resource *resource, *kr;
|
||||
uint32_t serial;
|
||||
|
||||
if (pointer->focus == surface)
|
||||
if (pointer->focus == surface && pointer->focus_resource != NULL)
|
||||
return;
|
||||
|
||||
resource = pointer->focus_resource;
|
||||
|
Loading…
Reference in New Issue
Block a user