diff --git a/src/Avalonia.Base/Input/IInputRoot.cs b/src/Avalonia.Base/Input/IInputRoot.cs
index 7edc69df52..344a4eefd7 100644
--- a/src/Avalonia.Base/Input/IInputRoot.cs
+++ b/src/Avalonia.Base/Input/IInputRoot.cs
@@ -27,10 +27,5 @@ namespace Avalonia.Input
/// Gets or sets a value indicating whether access keys are shown in the window.
///
bool ShowAccessKeys { get; set; }
-
- ///
- /// Gets associated mouse device
- ///
- IMouseDevice? MouseDevice { get; }
}
}
diff --git a/src/Avalonia.Controls/Platform/ITopLevelImpl.cs b/src/Avalonia.Controls/Platform/ITopLevelImpl.cs
index bd0339f525..6bb94c6070 100644
--- a/src/Avalonia.Controls/Platform/ITopLevelImpl.cs
+++ b/src/Avalonia.Controls/Platform/ITopLevelImpl.cs
@@ -6,7 +6,6 @@ using Avalonia.Input.Raw;
using Avalonia.Layout;
using Avalonia.Metadata;
using Avalonia.Rendering;
-using JetBrains.Annotations;
namespace Avalonia.Platform
{
@@ -151,13 +150,7 @@ namespace Avalonia.Platform
/// Gets or sets a method called when the input focus is lost.
///
Action? LostFocus { get; set; }
-
- ///
- /// Gets a mouse device associated with toplevel
- ///
- [CanBeNull]
- IMouseDevice MouseDevice { get; }
-
+
IPopupImpl? CreatePopup();
///
diff --git a/src/Avalonia.Controls/TopLevel.cs b/src/Avalonia.Controls/TopLevel.cs
index 7d0a1d2c39..1c1df84431 100644
--- a/src/Avalonia.Controls/TopLevel.cs
+++ b/src/Avalonia.Controls/TopLevel.cs
@@ -304,9 +304,6 @@ namespace Avalonia.Controls
set { SetValue(PointerOverElementProperty, value); }
}
- ///
- IMouseDevice? IInputRoot.MouseDevice => PlatformImpl?.MouseDevice;
-
///
/// Gets or sets a value indicating whether access keys are shown in the window.
///
diff --git a/tests/Avalonia.UnitTests/MockWindowingPlatform.cs b/tests/Avalonia.UnitTests/MockWindowingPlatform.cs
index 339b87cf88..e30f0fa5f3 100644
--- a/tests/Avalonia.UnitTests/MockWindowingPlatform.cs
+++ b/tests/Avalonia.UnitTests/MockWindowingPlatform.cs
@@ -34,7 +34,6 @@ namespace Avalonia.UnitTests
windowImpl.Setup(x => x.RenderScaling).Returns(1);
windowImpl.Setup(x => x.Screen).Returns(CreateScreenMock().Object);
windowImpl.Setup(x => x.Position).Returns(() => position);
- SetupToplevel(windowImpl);
windowImpl.Setup(x => x.CreatePopup()).Returns(() =>
{
@@ -100,8 +99,6 @@ namespace Avalonia.UnitTests
{
popupImpl.Object.Closed?.Invoke();
});
-
- SetupToplevel(popupImpl);
return popupImpl;
}
@@ -144,10 +141,5 @@ namespace Avalonia.UnitTests
{
return null;
}
-
- private static void SetupToplevel(Mock mock) where T : class, ITopLevelImpl
- {
- mock.SetupGet(x => x.MouseDevice).Returns(new MouseDevice());
- }
}
}
diff --git a/tests/Avalonia.UnitTests/TestRoot.cs b/tests/Avalonia.UnitTests/TestRoot.cs
index 41e29a85c4..138958512f 100644
--- a/tests/Avalonia.UnitTests/TestRoot.cs
+++ b/tests/Avalonia.UnitTests/TestRoot.cs
@@ -58,9 +58,7 @@ namespace Avalonia.UnitTests
public IKeyboardNavigationHandler KeyboardNavigationHandler => null;
public IInputElement PointerOverElement { get; set; }
-
- public IMouseDevice MouseDevice { get; set; }
-
+
public bool ShowAccessKeys { get; set; }
public IStyleHost StylingParent { get; set; }