Window touch drag-and-drop starts at pointer, not at finger
Thesola10 opened this issue · comments
Describe the bug
This is a technical addendum to #736. The way touch-based window dragging works, the initial coordinates when grabbing begins is used to determine the relative pointer position to the window using the global pointer. However, just as in #735, the global pointer cannot be used as a coordinates source for touch events.
This bug exists mainly as a self reminder, though anyone is free to pick it up.
To Reproduce
- Tap and hold a window titlebar with a touch screen
- Drag the window
Expected behavior
Same behavior as mouse-based drag-and-drop
Screenshots
The window jumps relative to where the pointer was when the gesture started
System information:
Irrelevant -- trust me :)
Any solution would require retrieving touch coordinates before a touch event is explicitly captured, just as MoveGrab.begin()
is being called.
Either we need to keep track of the global stage's last touch event (and while we're at it, develop a pointer broker between cursor and touch events), or a touch event context must be extracted from the window grab event... somehow...
Line 66 in 35afc1a
Above is the exact line of code where touch-based coordinates are required but cannot be retrieved using touch events like below:
Lines 88 to 95 in 35afc1a