-
-
Notifications
You must be signed in to change notification settings - Fork 10.9k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Force mouse source when --forward-all-clicks
Right click and middle click require the source device to be a mouse, not a touchscreen). Therefore, the source device was changed only when a button other than the primary button was pressed (see adc547f). However, this led to inconsistencies between the ACTION_DOWN when a secondary button is pressed (with a mouse as source device) and the matching ACTION_UP when the secondary button is released (with a touchscreen as source device, because then there is no button pressed). To avoid the problem in all cases, force a mouse as source device when --forward-all-clicks is set. Concretely, in --forward-all-clicks mode: - device source is set to InputDevice.SOURCE_MOUSE; - motion event toolType is set to MotionEvent.TOOL_TYPE_MOUSE; For all (virtual or not) finger events: - device source is set to InputDevice.SOURCE_TOUCHSCREEN; - motion event toolType is set to MotionEvent.TOOL_TYPE_FINGER. Fixes #3568 <#3568> Signed-off-by: Romain Vimont <[email protected]> TODO: - test that nothing is broken on a computer with a touchscreen, both with and without --forward-all-clicks
- Loading branch information
1 parent
597703b
commit eb83411
Showing
6 changed files
with
51 additions
and
14 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters