[PATCH] desktop-shell: Track focused shell surface by main surface

Quentin Glidic sardemff7+wayland at sardemff7.net
Wed Jul 26 10:53:14 UTC 2017


On 7/26/17 12:02 PM, Philipp Kerling wrote:
> The focused surface is used for determining whether shell surfaces
> are activated. They should also be considered activated when a
> subsurface has focus. Inserting a call to
> weston_surface_get_main_surface fixes this.
> 
> seat->focused_surface is only used for shell_surface keyboard focus
> tracking.

As said on IRC, added your Sob, and:
Reviewed-by: Quentin Glidic <sardemff7+git at sardemff7.net>

And pushed:
4c4b9cfb..ba8a0d04  master -> master

Thanks!

> ---
>   desktop-shell/shell.c | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/desktop-shell/shell.c b/desktop-shell/shell.c
> index 832a7b74..4608cf2f 100644
> --- a/desktop-shell/shell.c
> +++ b/desktop-shell/shell.c
> @@ -1852,7 +1852,7 @@ handle_keyboard_focus(struct wl_listener *listener, void *data)
>   			shell_surface_lose_keyboard_focus(shsurf);
>   	}
>   
> -	seat->focused_surface = keyboard->focus;
> +	seat->focused_surface = weston_surface_get_main_surface(keyboard->focus);
>   
>   	if (seat->focused_surface) {
>   		struct shell_surface *shsurf = get_shell_surface(seat->focused_surface);
> _______________________________________________
> wayland-devel mailing list
> wayland-devel at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/wayland-devel
> 


-- 

Quentin “Sardem FF7” Glidic


More information about the wayland-devel mailing list