[PATCH xwayland 2/7] xwayland: Allow pointer warp on the root window

Jonas Ã…dahl jadahl at gmail.com
Mon Feb 20 02:57:24 UTC 2017


On Sat, Nov 12, 2016 at 05:25:17PM +0100, Carlos Garnacho wrote:
> Of sorts, as we can't honor pointer warping across the whole root window
> coordinates, peek the pointer focus in this case.
> 
> Signed-off-by: Carlos Garnacho <carlosg at gnome.org>
> ---
>  hw/xwayland/xwayland.c | 4 ++++
>  1 file changed, 4 insertions(+)
> 
> diff --git a/hw/xwayland/xwayland.c b/hw/xwayland/xwayland.c
> index c277870..ff0e2e5 100644
> --- a/hw/xwayland/xwayland.c
> +++ b/hw/xwayland/xwayland.c
> @@ -180,6 +180,10 @@ xwl_cursor_warped_to(DeviceIntPtr device,
>          xwl_seat = xwl_screen_get_default_seat(xwl_screen);
>  
>      xwl_window = xwl_window_from_window(window);
> +    if (!xwl_window && !window->parent) {
> +        DebugF("Warp on root window, assuming pointer focus\n");
> +        xwl_window = xwl_seat->focus_window;
> +    }

Should we maybe avoid doing this if the focus window is of a different
client than the client doing the warping?


Jonas

>      if (!xwl_window)
>          return;
>  
> -- 
> 2.9.3
> 


More information about the xorg-devel mailing list