[PATCH weston] shell: set the popup grab button as pressed only if it actually is

Kristian Høgsberg hoegsberg at gmail.com
Wed Mar 27 09:54:47 PDT 2013


On Wed, Mar 27, 2013 at 04:44:03PM +0100, Giulio Camuffo wrote:
> ---
>  src/shell.c | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)

Nice, I see the problem with gtk+ too.  If I click to open, mosue
around to other menus or submenus (resets initial_up) and then click
outside any client surface, that click is ignored instead of ending
the popup.  But we should put a description like that in the commit
message, especially for subtle issues like this.

Care to resend with that?

Thanks,
Kristian

> diff --git a/src/shell.c b/src/shell.c
> index da9193c..899db8c 100644
> --- a/src/shell.c
> +++ b/src/shell.c
> @@ -2008,7 +2008,8 @@ add_popup_grab(struct shell_surface *shsurf, struct shell_seat *shseat)
>  	if (wl_list_empty(&shseat->popup_grab.surfaces_list)) {
>  		shseat->popup_grab.client = shsurf->surface->surface.resource.client;
>  		shseat->popup_grab.grab.interface = &popup_grab_interface;
> -		shseat->popup_grab.initial_up = 0;
> +		if (shseat->seat->pointer.button_count > 0)
> +			shseat->popup_grab.initial_up = 0;
>  
>  		wl_pointer_start_grab(seat->pointer, &shseat->popup_grab.grab);
>  	}
> -- 
> 1.8.2
> 
> _______________________________________________
> 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