swaywm / sway

i3-compatible Wayland compositor
https://swaywm.org
MIT License
14.21k stars 1.08k forks source link

Pointer events are issued at the last touch position #1896

Open BurningTreeC opened 6 years ago

BurningTreeC commented 6 years ago
  1. Move cursor to position A
  2. Touch position B
  3. Click with mouse
  4. Observe that the click event was sent to position B, though the cursor has not moved

Hi, I've tried the recent master with the basic touch support - one thing I've experienced on my touch laptop:

tapping on my touch screen and afterwards clicking the mouse pointer results in a click at the last position of the touch pointer, though the mouse pointer is visible on a different position.

I'm not able to look at the code, but wanted to mention this, it's a small thing and can easily be overseen

Thanks for your great work on sway !

ddevault commented 6 years ago

I am unable to reproduce this

BurningTreeC commented 6 years ago

If the mouse pointer moves before the click, the coordinates update and it works as one expects

But not if the cursor doesn't move - in that case a popup triggered by right-click opens at the touch position

edrex commented 5 years ago

ah, I was able to reproduce by moving during the touch, which generates TOUCH_MOTION events, which evidently are updating the pointer position. libinput debug for click-touch-click and click-touchmove-click here.

mishurov commented 2 months ago

On a touch screen for_window [...] move position mouse|pointer|cursor moves a new window to a mouse cursor instead of a touch point.