[PATCH weston] input: Do not override keyboard focus on restore

Daniel Stone daniel at fooishbar.org
Fri Jun 23 11:05:33 UTC 2017


Hi Quentin,

On 22 March 2017 at 16:06, Quentin Glidic
<sardemff7+wayland at sardemff7.net> wrote:
> @@ -2070,7 +2070,8 @@ notify_keyboard_focus_in(struct weston_seat *seat, struct wl_array *keys,
>
>         if (surface) {
>                 wl_list_remove(&seat->saved_kbd_focus_listener.link);
> -               weston_keyboard_set_focus(keyboard, surface);
> +               if (!keyboard->focus)
> +                       weston_keyboard_set_focus(keyboard, surface);
>                 seat->saved_kbd_focus = NULL;
>         }

Would it not be better to just remove seat->saved_kbd_focus on
weston_keyboard_set_focus()? That seems more correct to me regardless.

Cheers,
Daniel


More information about the wayland-devel mailing list