Skip to content

Commit

Permalink
log number of touches in the event, and add question about tracking t…
Browse files Browse the repository at this point in the history
…ouches outside the window
  • Loading branch information
shaunlebron committed Nov 28, 2022
1 parent 49a4483 commit d59dfee
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions macos/cc/JWMMainView.mm
Original file line number Diff line number Diff line change
Expand Up @@ -293,11 +293,16 @@ - (BOOL)acceptsTouchEvents {
}

- (void)touchesBeganWithEvent:(NSEvent *)event {
NSLog(@"TOUCH BEGAN");
// FIXME: Mouse events originating outside the view are still tracked if the window is in focus.
// But touch events here are only triggered if the cursor originates inside the view.
// Is this related to fTrackingArea?
NSSet *touches = [event touchesMatchingPhase:NSTouchPhaseTouching inView:nil];
NSLog(@"TOUCH BEGAN: %d", touches.count);
}

- (void)touchesMovedWithEvent:(NSEvent *)event {
NSLog(@"TOUCH MOVED");
NSSet *touches = [event touchesMatchingPhase:NSTouchPhaseTouching inView:nil];
NSLog(@"TOUCH MOVED: %d", touches.count);
}

- (void)touchesEndedWithEvent:(NSEvent *)event {
Expand Down

0 comments on commit d59dfee

Please sign in to comment.