Skip to content

Commit

Permalink
Added support for MotionEvent.ACTION_BUTTON_PRESS and MotionEvent.ACT…
Browse files Browse the repository at this point in the history
…ION_BUTTON_RELEASE mouse actions.
  • Loading branch information
iiordanov committed May 8, 2024
1 parent 7349e05 commit 92a7ec7
Showing 1 changed file with 2 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -170,6 +170,7 @@ protected boolean handleMouseActions(MotionEvent e) {
switch (action) {
// If a mouse button was pressed or mouse was moved.
case MotionEvent.ACTION_DOWN:
case MotionEvent.ACTION_BUTTON_PRESS:
case MotionEvent.ACTION_MOVE:
switch (bstate) {
case MotionEvent.BUTTON_PRIMARY:
Expand All @@ -193,6 +194,7 @@ protected boolean handleMouseActions(MotionEvent e) {
break;
// If a mouse button was released.
case MotionEvent.ACTION_UP:
case MotionEvent.ACTION_BUTTON_RELEASE:
switch (bstate) {
case 0:
if (e.getToolType(0) != MotionEvent.TOOL_TYPE_MOUSE) {
Expand Down

0 comments on commit 92a7ec7

Please sign in to comment.