[PATCH weston] clients: ungrab the correct input when menus close
Bryce Harrington
bryce at osg.samsung.com
Tue Sep 22 18:23:02 PDT 2015
On Fri, Sep 11, 2015 at 02:28:15PM -0500, Derek Foreman wrote:
> We need to input_ungrab() on the stored input, not the one that caused
> the release - otherwise bad things can happen in multi-seat environments
> when a seat that didn't open the menu closes it.
>
> To reproduce:
> configure two seats
> launch weston terminal
> open the right click pop up
> select a menu item from the other seat
>
> The next click from the seat that opened the menu will cause a segfault.
>
> Signed-off-by: Derek Foreman <derekf at osg.samsung.com>
Reviewed-by: Bryce Harrington <bryce at osg.samsung.com>
And pushed:
remote: I: patch #59371 updated using rev 673bbe2e8c6953fff676e2d4e03ba5454b7a6bcd
remote: I: 1 patch(es) updated to state Accepted.
To ssh://git.freedesktop.org/git/wayland/weston
9d7aff0..673bbe2 master -> master
> ---
> Clients/window.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/clients/window.c b/clients/window.c
> index 0e73f5b..47a79aa 100644
> --- a/clients/window.c
> +++ b/clients/window.c
> @@ -4738,7 +4738,7 @@ menu_button_handler(struct widget *widget,
> /* Either relase after press-drag-release or
> * click-motion-click. */
> menu->func(menu->user_data, input, menu->current);
> - input_ungrab(input);
> + input_ungrab(menu->input);
> menu_destroy(menu);
> } else if (state == WL_POINTER_BUTTON_STATE_RELEASED) {
> menu->release_count++;
> --
> 2.5.1
>
> _______________________________________________
> wayland-devel mailing list
> wayland-devel at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/wayland-devel
More information about the wayland-devel
mailing list