Open groszdaniel opened 3 years ago
Actually it should be possible: ydotool can move the cursor to an absolute location. It looks like the trick is to first do a move to (-INT32_MAX, -INT32_MAX) which in reality moves the mouse cursor to (0,0), and then a relative move to the specified location. However, we would need to know how the touchscreen is mapped to the X11/Wayland coordinate system.
I know it's a bit late but... I have a local build without this problem. The solution is to speciy ABS_X and ABS_Y events just before submitting the right click.
The only reason I haven't submitted a PR is that my fquick ix requires the first whitelisted touch device to be the ONLY touch device, since the virtual device has to have the same minimum/maximum/resolution as the real touch device.
I think the long term solutions are either:
Not really sure which is best, open to suggestions.
On Wayland (unlike on XOrg) touch input does not move the mouse pointer to the location of the touch. When a right-click is simulated, the popup menu opens at the current location of the cursor, not at the place of the touch. This may open a different menu than the intended one. (I don't know what happens on devices without a mouse at all.)
Is there a way to fix this? I'm afraid not without interacting more directly with Wayland, unless there is a way to simulate an absolute pointer device event that does cause Wayland to move the the cursor.