Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -275,11 +275,11 @@ static void ProcessRecognizerHandlerTap(
if (weakRecognizer.Target is IPinchGestureController pinchGestureRecognizer &&
weakEventTracker.Target is GesturePlatformManager eventTracker &&
eventTracker._handler?.VirtualView is View view &&
UIApplication.SharedApplication.GetKeyWindow() is UIWindow window)
eventTracker.PlatformView is {} platformView)
{
var oldScale = eventTracker._previousScale;
var originPoint = r.LocationInView(null);
originPoint = window.ConvertPointToView(originPoint, eventTracker.PlatformView);
originPoint = platformView.Window.ConvertPointToView(originPoint, platformView);

var scaledPoint = new Point(originPoint.X / view.Width, originPoint.Y / view.Height);

Expand Down Expand Up @@ -412,8 +412,7 @@ UISwipeGestureRecognizer CreateSwipeRecognizer(SwipeDirection direction, Action<
{
if (weakRecognizer.Target is PointerGestureRecognizer pointerGestureRecognizer &&
weakEventTracker.Target is GesturePlatformManager eventTracker &&
eventTracker._handler?.VirtualView is View view &&
eventTracker._handler?.MauiContext?.GetPlatformWindow() is UIWindow window)
eventTracker._handler?.VirtualView is View view)
{
var originPoint = pointerGesture.LocationInView(eventTracker?.PlatformView);
var platformPointerArgs = new PlatformPointerEventArgs(pointerGesture.View, pointerGesture);
Expand Down