[PATCH weston 1/2] shell: update pointer focus when surface is minimized.

Derek Foreman derekf at osg.samsung.com
Tue Oct 6 12:32:57 PDT 2015


On 06/10/15 10:40 AM, Derek Foreman wrote:
> From: Nicolas Guyomard <nicolas.guyomard at open.eurogiciel.org>
> 
> Signed-off-by: Nicolas Guyomard <nicolas.guyomard at open.eurogiciel.org>
> Signed-off-by: Derek Foreman <derekf at osg.samsung.com>
> ---

Nicolas brought it to my attention that this patch was already rejected
in this thread:
http://lists.freedesktop.org/archives/wayland-devel/2015-March/020971.html

the tl;dr is that the pointer focus is immediately updated anyway, so
there's no need to clear it (and in fact clearing it here is a wasteful
event)

So,
NAK - sorry for the noise.

>  desktop-shell/shell.c | 6 +++++-
>  1 file changed, 5 insertions(+), 1 deletion(-)
> 
> diff --git a/desktop-shell/shell.c b/desktop-shell/shell.c
> index 3c6a3da..ee705e5 100644
> --- a/desktop-shell/shell.c
> +++ b/desktop-shell/shell.c
> @@ -2728,12 +2728,16 @@ set_minimized(struct weston_surface *surface)
>  	wl_list_for_each(seat, &shsurf->shell->compositor->seat_list, link) {
>  		struct weston_keyboard *keyboard =
>  			weston_seat_get_keyboard(seat);
> +		struct weston_pointer *pointer =
> +			weston_seat_get_pointer(seat);
>  
>  		if (!keyboard)
>  			continue;
>  		focus = weston_surface_get_main_surface(keyboard->focus);
> -		if (focus == view->surface)
> +		if (focus == view->surface) {
>  			weston_keyboard_set_focus(keyboard, NULL);
> +			weston_pointer_clear_focus(pointer);
> +		}
>  	}
>  
>  	shell_surface_update_child_surface_layers(shsurf);
> 



More information about the wayland-devel mailing list