Browse Source

Simplify MouseMove logic.

Steven Kirk 10 years ago
parent
commit
406f476a7c
1 changed files with 2 additions and 9 deletions
  1. 2 9
      src/Perspex.Input/MouseDevice.cs

+ 2 - 9
src/Perspex.Input/MouseDevice.cs

@@ -143,15 +143,8 @@ namespace Perspex.Input
             }
             else
             {
-                var offset = new Point();
-                var ancestors = Captured.GetVisualAncestors().OfType<IInputElement>().ToList();
-
-                foreach (IVisual ancestor in ancestors)
-                {
-                    offset += ancestor.Bounds.Position;
-                }
-
-                SetPointerOver(this, root, ancestors);
+                var elements = Captured.GetSelfAndVisualAncestors().OfType<IInputElement>().ToList();
+                SetPointerOver(this, root, elements);
                 source = Captured;
             }