Absolute mouse position

Jesse Van Gavere jesse.vangavere at scioteq.com
Mon Sep 19 11:43:47 UTC 2022



-----Original Message-----
From: Simon Ser <contact at emersion.fr> 
Sent: Monday, 19 September 2022 13:31
To: Jesse Van Gavere <jesse.vangavere at scioteq.com>
Cc: wayland-devel at lists.freedesktop.org
Subject: Re: Absolute mouse position

On Monday, September 19th, 2022 at 13:19, Jesse Van Gavere <jesse.vangavere at scioteq.com> wrote:

> Is it possible to somehow get the absolute mouse position relative to 
> a screen from Wayland as was possible in X11? It is something an 
> application of ours relies on to work properly and we’ve been trying 
> to see if we can make this work in both X11 and Wayland.

No, this isn't possible, by design.

Can you explain your use-case? Then maybe we can suggest a way to make it work on Wayland.

Simon

Hello Simon,

Thank you for responding, and certainly.
We have in essence a KVM device that can control some local connected servers/computers, it has a sort of composition of the connected computers so you can control each server simultaneously and we achieve this by tracking the mouse position to know when to go to another server (basically a mouse event that goes over a servers border within the composition to another server), we have an absolute/relative mouse mode on this, in the absolute mouse mode knowing the position at the server side is not important because our KVM always sends Absolute/TS events so it's always aware and in control of its position, however in the relative mode we do not, there might be mouse acceleration, mouse warping (a primary use case for why we would use a relative mode on our KVM) and all kinds of things going on at the server side we have no control over.

To compensate for this we made a small tool that currently interrogates the X server for its mouse position, it communicates this back to our KVM and that way our KVM can keep an up to date internal position of the mouse.

But we keep running into issues because everything is moving to Wayland and our application is only able to receive mouse positions if the mouse is on an application using the X server and this creates undesirable behavior, so we're looking to fix this by having a way to receive the mouse no matter if the mouse is on an application using X or Wayland.

Do you have an idea on how this would be possible? We are allowed to install/use almost anything to get this working so any ideas, no matter how exotic, is welcome.

Thanks.

Regards,
Jesse


More information about the wayland-devel mailing list