[PATCH weston 1/2] input: Update keyboard serial on press and release

Olivier Fourdan ofourdan at redhat.com
Wed Aug 10 12:25:36 UTC 2016


Hi all,

Small reminder, I don't think I got any review/reply of these two patches...

Cheers,
Olivier


----- Original Message -----
> Other compositors such as mutter update the keyboard serial for both key
> press and key release, unlike weston which updates it only on key press.
> 
> When dealing with popup windows which require a match in serials, if the
> event that caused the popup to be shown is a key release, then the popup
> would be dismissed.
> 
> This occurs when navigating gtk+ sub-menus using the keyboard.
> 
> Signed-off-by: Olivier Fourdan <ofourdan at redhat.com>
> Bugzilla: https://bugzilla.gnome.org/show_bug.cgi?id=768017
> ---
>  libweston/input.c | 3 +--
>  1 file changed, 1 insertion(+), 2 deletions(-)
> 
> diff --git a/libweston/input.c b/libweston/input.c
> index 8f46698..18c4c1f 100644
> --- a/libweston/input.c
> +++ b/libweston/input.c
> @@ -1661,9 +1661,8 @@ notify_key(struct weston_seat *seat, uint32_t time,
> uint32_t key,
>  				      state);
>  	}
>  
> +	keyboard->grab_serial = wl_display_get_serial(compositor->wl_display);
>  	if (state == WL_KEYBOARD_KEY_STATE_PRESSED) {
> -		keyboard->grab_serial =
> -			wl_display_get_serial(compositor->wl_display);
>  		keyboard->grab_time = time;
>  		keyboard->grab_key = key;
>  	}
> --
> 2.7.4
> 
> _______________________________________________
> wayland-devel mailing list
> wayland-devel at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/wayland-devel
> 


More information about the wayland-devel mailing list