[PATCH weston 3/3] compositor-x11: Support relative mouse motion in fullscreen

Pekka Paalanen ppaalanen at gmail.com
Fri Jan 31 11:43:44 UTC 2020


On Tue, 10 Oct 2017 00:12:34 +0200
Marie Stephanie Alesna <istephielicious at gmail.com> wrote:

> Wayland relative mouse clients require indefinite mouse moves.  Simulate them
> by keeping invisible host mouse pointer in center of screen using mouse warps.
> 
> Also fix fullscreen mouse lock-up at invisible barrier when the invisible host
> mouse pointer hits an edge of the screen.
> 
> Signed-off-by: Marie Stephanie Alesna <istephielicious at gmail.com>
> ---
>  libweston/compositor-x11.c | 59 ++++++++++++++++++++++++++++++++++++++++++++--
>  1 file changed, 57 insertions(+), 2 deletions(-)
> 

Hi,

thanks for the three patches, the high-level ideas what they do seem
fine.

patch 1: I'd have to take a look if that is the right place to do it,
or is it just an ad hoc band-aid and would be better fixed in some
other way in a more "once and for all" solution.

patch 2: looks good.

patch 3: Wasn't there a more modern way of doing this instead of
abusing XWarpPointer? Something about maybe XI2 delivering relative
pointer events?

I also wonder, if Weston is fullscreen and something else like a
notification pops up in a corner, is it possible for the user to go
and click the notification?

I suspect we would need to pass through the pointer confinement
protocol to be able to make things behave by end user expectations,
since x11-backend cannot keep on delivering relative motion if the
pointer hits an edge in the X server, but without pointer confinement
the user actually expects to hit an edge and/or be able to click other
X11 windows.

I have noticed myself, that when Weston/x11 starts, the initial pointer
position in Weston vs. the X server does not match. If you wanted to
fix that only, then I think some fix to init the pointer position from
X11 instead of hardcoded should be enough.

If you want to revise these, please submit them via Gitlab.

https://gitlab.freedesktop.org/wayland/weston/blob/master/CONTRIBUTING.md


Thanks,
pq
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 833 bytes
Desc: OpenPGP digital signature
URL: <https://lists.freedesktop.org/archives/wayland-devel/attachments/20200131/9620d345/attachment.sig>


More information about the wayland-devel mailing list