Browse Source

Revert "Allow embedded root automation peers."

This reverts commit 0e7b8f6f45. The code is in the wrong place.
pull/12330/head
Steven Kirk 3 years ago
parent
commit
02789d2d48
  1. 12
      src/Windows/Avalonia.Win32/Automation/RootAutomationNode.cs

12
src/Windows/Avalonia.Win32/Automation/RootAutomationNode.cs

@ -33,7 +33,7 @@ namespace Avalonia.Win32.Automation
return null;
var p = WindowImpl.PointToClient(new PixelPoint((int)x, (int)y));
var found = InvokeSync(() => GetPeerFromPoint(p));
var found = InvokeSync(() => Peer.GetPeerFromPoint(p));
var result = GetOrCreate(found) as IRawElementProviderFragment;
return result;
}
@ -101,15 +101,5 @@ namespace Avalonia.Win32.Automation
return result;
}
}
private AutomationPeer? GetPeerFromPoint(Point p)
{
var hit = Peer.GetPeerFromPoint(p);
while (hit != Peer && hit?.GetProvider<IRootProvider>() is { } embeddedRoot)
hit = embeddedRoot.GetPeerFromPoint(p);
return hit;
}
}
}

Loading…
Cancel
Save