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

Bryce Harrington bryce at osg.samsung.com
Wed Oct 7 17:12:31 PDT 2015


On Tue, Oct 06, 2015 at 10:40:27AM -0500, 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>

Reviewed-by: Bryce Harrington <bryce at osg.samsung.com>

> ---
>  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);
> -- 
> 2.5.3
> 
> _______________________________________________
> 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