<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=Windows-1252">
<style type="text/css" style="display:none;"> P {margin-top:0;margin-bottom:0;} </style>
</head>
<body dir="ltr">
<div style="font-family: Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);" class="elementToProof">
This sounds like Synergy I've used, which monitor to the mouse position to know if the mouse has moved to edges of the screen, to control the mouse apply to another device's screen.<br>
</div>
<div id="appendonsend"></div>
<hr style="display:inline-block;width:98%" tabindex="-1">
<div id="divRplyFwdMsg" dir="ltr"><font face="Calibri, sans-serif" style="font-size:11pt" color="#000000"><b>From:</b> wayland-devel <wayland-devel-bounces@lists.freedesktop.org> on behalf of Jonas Ådahl <jadahl@gmail.com><br>
<b>Sent:</b> Monday, September 19, 2022 19:59<br>
<b>To:</b> Jesse Van Gavere <jesse.vangavere@scioteq.com><br>
<b>Cc:</b> wayland-devel@lists.freedesktop.org <wayland-devel@lists.freedesktop.org><br>
<b>Subject:</b> Re: Absolute mouse position</font>
<div> </div>
</div>
<div class="BodyFragment"><font size="2"><span style="font-size:11pt;">
<div class="PlainText">On Mon, Sep 19, 2022 at 11:43:47AM +0000, Jesse Van Gavere wrote:<br>
> <br>
> <br>
> -----Original Message-----<br>
> From: Simon Ser <contact@emersion.fr> <br>
> Sent: Monday, 19 September 2022 13:31<br>
> To: Jesse Van Gavere <jesse.vangavere@scioteq.com><br>
> Cc: wayland-devel@lists.freedesktop.org<br>
> Subject: Re: Absolute mouse position<br>
> <br>
> On Monday, September 19th, 2022 at 13:19, Jesse Van Gavere <jesse.vangavere@scioteq.com> wrote:<br>
> <br>
> > Is it possible to somehow get the absolute mouse position relative to <br>
> > a screen from Wayland as was possible in X11? It is something an <br>
> > application of ours relies on to work properly and we’ve been trying <br>
> > to see if we can make this work in both X11 and Wayland.<br>
> <br>
> No, this isn't possible, by design.<br>
> <br>
> Can you explain your use-case? Then maybe we can suggest a way to make it work on Wayland.<br>
> <br>
> Simon<br>
> <br>
> Hello Simon,<br>
> <br>
> Thank you for responding, and certainly.<br>
> 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.<br>
> <br>
> 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.<br>
> <br>
> 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.<br>
> <br>
> 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.<br>
<br>
What it sounds like is something rather similar to Input Leap<br>
(<a href="https://nam12.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Finput-leap%2Finput-leap&amp;data=05%7C01%7C%7C806b8f1a1168461df16e08da9a36785c%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C637991855996366459%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&amp;sdata=sS5BrgVSZA8NJqAZaMPG%2FjpcLz8zV2Izk1uEsb%2BBTz0%3D&amp;reserved=0">https://nam12.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Finput-leap%2Finput-leap&amp;data=05%7C01%7C%7C806b8f1a1168461df16e08da9a36785c%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C637991855996366459%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&amp;sdata=sS5BrgVSZA8NJqAZaMPG%2FjpcLz8zV2Izk1uEsb%2BBTz0%3D&amp;reserved=0</a>)
 which roughly aims to provide<br>
a way to use the same mouse/keyboard device on multiple computers, also<br>
by finding out when a pointer touches the edge of a screen that<br>
logically bridges to some other machine.<br>
<br>
There are a couple approaches to get this kind of functionality to a<br>
Wayland session:<br>
<br>
One is the "input capture" XDG Desktop portal<br>
(<a href="https://nam12.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fflatpak%2Fxdg-desktop-portal%2Fpull%2F714&amp;data=05%7C01%7C%7C806b8f1a1168461df16e08da9a36785c%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C637991855996366459%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&amp;sdata=1bKFoMnZhpZlr0nSyNt9VEfilU3pVUQwCQM6UIYY5ZA%3D&amp;reserved=0">https://nam12.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fflatpak%2Fxdg-desktop-portal%2Fpull%2F714&amp;data=05%7C01%7C%7C806b8f1a1168461df16e08da9a36785c%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C637991855996366459%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&amp;sdata=1bKFoMnZhpZlr0nSyNt9VEfilU3pVUQwCQM6UIYY5ZA%3D&amp;reserved=0</a>)
 that aims to<br>
provide a sandbox friendly way to let applications capture input without<br>
allowing arbitrary applications to eaves drop on input events all the<br>
time. It uses libei (<a href="https://nam12.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgitlab.freedesktop.org%2Flibinput%2Flibei&amp;data=05%7C01%7C%7C806b8f1a1168461df16e08da9a36785c%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C637991855996366459%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&amp;sdata=xtouSl4WIVxtoocPgqu6WSTECWCoK%2FIyd2Vb%2FZ5rXZM%3D&amp;reserved=0">https://nam12.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgitlab.freedesktop.org%2Flibinput%2Flibei&amp;data=05%7C01%7C%7C806b8f1a1168461df16e08da9a36785c%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C637991855996366459%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&amp;sdata=xtouSl4WIVxtoocPgqu6WSTECWCoK%2FIyd2Vb%2FZ5rXZM%3D&amp;reserved=0</a>)
 as a<br>
method of input event transfer. As for the receiving side, the aim is to<br>
tie the knot together with using libei for transmitting events in the<br>
other direction via the remote desktop XDG desktop portal<br>
(<a href="https://nam12.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fflatpak%2Fxdg-desktop-portal%2Fpull%2F762&amp;data=05%7C01%7C%7C806b8f1a1168461df16e08da9a36785c%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C637991855996366459%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&amp;sdata=ZqGT17cwALZHWS2k5q%2BfjE1IMEQEDtTshPYielpfZaU%3D&amp;reserved=0">https://nam12.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fflatpak%2Fxdg-desktop-portal%2Fpull%2F762&amp;data=05%7C01%7C%7C806b8f1a1168461df16e08da9a36785c%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C637991855996366459%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&amp;sdata=ZqGT17cwALZHWS2k5q%2BfjE1IMEQEDtTshPYielpfZaU%3D&amp;reserved=0</a>).<br>
<br>
The other approach focuses is as far as I know for the receiving end of<br>
the problem, and uses various wlroots Wayland protocols for injecting<br>
input events (<a href="https://nam12.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fr-c-f%2Fwaynergy&amp;data=05%7C01%7C%7C806b8f1a1168461df16e08da9a36785c%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C637991855996366459%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&amp;sdata=rOPmXrayB869fMvwP5aZhgmkADFBR0vjve%2FuqsssYU8%3D&amp;reserved=0">https://nam12.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fr-c-f%2Fwaynergy&amp;data=05%7C01%7C%7C806b8f1a1168461df16e08da9a36785c%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C637991855996366459%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&amp;sdata=rOPmXrayB869fMvwP5aZhgmkADFBR0vjve%2FuqsssYU8%3D&amp;reserved=0</a>).
 I'm sure others are<br>
more aware of the details, and whether it aims to solve the input<br>
capture side of this as well.<br>
<br>
<br>
Jonas<br>
<br>
> <br>
> Thanks.<br>
> <br>
> Regards,<br>
> Jesse<br>
</div>
</span></font></div>
</body>
</html>