Absolute mouse position retrieval

Jonas Ådahl jadahl at gmail.com
Mon Dec 6 13:21:03 UTC 2021


The way this seems to be implemented seems quite similar to screen
casting. With screen casting you can get per screen cast stream absolute
cursor positions "streamed" via the PipeWire metadata, only that it will
be alongside actual screen content as well, which I imagine is not
something you need.

Maybe it could be explored whether it makes sense to do this via the
screen casting API, i.e. via PipeWire stream negotiation, by making it
possible to not including the actual screen content when streaming. It
might be a bit "overkill" but it'd have the benefit of being able to
reuse all the sandbox permission management, portal dialog
implementations, and related things that this involves.


Jonas

On Mon, Dec 06, 2021 at 11:19:06AM +0000, Jesse Van Gavere wrote:
> We're not using a device driver, it's a very small application that uses XInput2 to wait for mouse events using XNextEvent and when it sees a mouse event it gets the current position through XQueryPointer and transmits that over a serial link to our device. I was just wondering if a similar feature on Wayland exists or it's a feature that will be added/can be added by us one way or another.
> 
> -----Original Message-----
> From: Simon Ser <contact at emersion.fr> 
> Sent: Monday, 6 December 2021 12:10
> To: Jesse Van Gavere <jesse.vangavere at scioteq.com>
> Cc: wayland-devel at lists.freedesktop.org
> Subject: Re: Absolute mouse position retrieval
> 
> > For a device we’re making, it’s necessary to have a daemon running on 
> > servers which frequently polls the absolute mouse location and 
> > transmits this to our device, this is a necessary feature to have 
> > correct operation of our device.
> 
> Can you expand on this?
> 
> Writing a device driver in user-space which connects to X11 or Wayland is not the right way to do it.


More information about the wayland-devel mailing list