Skip to content

Commit

Permalink
manager: fix mouse right click on iOS
Browse files Browse the repository at this point in the history
Fixes #523
  • Loading branch information
osy committed Dec 29, 2020
1 parent ed3b65f commit a8d02d5
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions Platform/iOS/Display/VMDisplayMetalViewController+Touch.m
Original file line number Diff line number Diff line change
Expand Up @@ -602,9 +602,11 @@ - (void)touchesBegan:(NSSet<UITouch *> *)touches withEvent:(UIEvent *)event {
}
// Apple Pencil 2 right click mode
if (@available(iOS 12.1, *)) {
primary = !_pencilForceRightClickOnce;
secondary = _pencilForceRightClickOnce;
_pencilForceRightClickOnce = false;
if (touch.type == UITouchTypePencil) {
primary = !_pencilForceRightClickOnce;
secondary = _pencilForceRightClickOnce;
_pencilForceRightClickOnce = false;
}
}
[_cursor startMovement:pos];
[_cursor updateMovement:pos];
Expand Down

0 comments on commit a8d02d5

Please sign in to comment.