forked from extern/Unexpected-Keyboard
Don't send event at end of sliding
A sliding pointer going up must not cause a key event to be sent. This caused an extra cursor movement and cleared the latched modifiers.
This commit is contained in:
parent
854eff211d
commit
7bc93c470e
@ -103,6 +103,11 @@ public final class Pointers implements Handler.Callback
|
||||
Pointer ptr = getPtr(pointerId);
|
||||
if (ptr == null)
|
||||
return;
|
||||
if (ptr.sliding)
|
||||
{
|
||||
onTouchUp_sliding(ptr);
|
||||
return;
|
||||
}
|
||||
stopKeyRepeat(ptr);
|
||||
Pointer latched = getLatched(ptr);
|
||||
if (latched != null) // Already latched
|
||||
@ -382,6 +387,14 @@ public final class Pointers implements Handler.Callback
|
||||
ptr.sliding_count = (int)(initial_dy / _config.slide_step_px);
|
||||
}
|
||||
|
||||
/** Handle a sliding pointer going up. Latched modifiers are not cleared to
|
||||
allow easy adjustments to the cursors. The pointer is cancelled. */
|
||||
void onTouchUp_sliding(Pointer ptr)
|
||||
{
|
||||
removePtr(ptr);
|
||||
_handler.onPointerFlagsChanged(false);
|
||||
}
|
||||
|
||||
/** Handle move events for sliding pointers. [dx] is distance travelled from
|
||||
[downX]. */
|
||||
void onTouchMove_sliding(Pointer ptr, float dx)
|
||||
|
Loading…
Reference in New Issue
Block a user