Skip to content

Commit

Permalink
Map iOS touches to Flutter view coordinate system (flutter#4425)
Browse files Browse the repository at this point in the history
This change ensures that touches are mapped to the Flutter view
co-ordinate system. In the case of a Flutter view that doesn't share the
same origin and orientation as the screen co-ordinate system, touches
were appled in the wrong location. This bug affected Flutter views whose
origin was not the screen origin and Flutter apps running with the
in-call status bar on iPhones other than the iPhone X.
  • Loading branch information
najeira authored and cbracken committed Dec 12, 2017
1 parent 6c6b709 commit 4ea7075
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -483,7 +483,7 @@ - (void)dispatchTouches:(NSSet*)touches phase:(UITouchPhase)phase {
}

FXL_DCHECK(device_id != 0);
CGPoint windowCoordinates = [touch locationInView:nil];
CGPoint windowCoordinates = [touch locationInView:self.view];

blink::PointerData pointer_data;
pointer_data.Clear();
Expand Down

0 comments on commit 4ea7075

Please sign in to comment.