xwayland: Plug XDG portal to XTEST

The XDG portal RemoteDesktop API supports both relative and absolute
pointer motion events.

However, for the latter, it requires a Screencast session to be
initiated first, and the Screencast session is limited to a single
output by default, meaning that we cannot use that API for the entire
X11 screen which may include more than one output.

So the Screencast session is not practical to use in the Xwayland case,
therefore we limit who relative motion events.

If the pointer is placed on an Xwayland window, we can deduce the
relative motion since the global location is known to Xwayland on X11
surfaces, in which case we shall honor the request.

However, if the pointer has left all X11 surfaces, there is no way for
Xwayland to know the actual location of the pointer in the global
compositor space and hence deduce the relative motion, so in this case
we simply ignore the request for now.

Signed-off-by: Olivier Fourdan <ofourdan@redhat.com>
4 jobs for xwayland-xdg-portal in 1 minute and 30 seconds
latest