From 30d7780f1e071d881974e7b59b6b71439dea92ef Mon Sep 17 00:00:00 2001 From: thefiddler Date: Tue, 13 May 2014 23:51:55 +0200 Subject: [PATCH] [X11] Removed unused warp detection code --- Source/OpenTK/Platform/X11/XI2Mouse.cs | 16 ---------------- 1 file changed, 16 deletions(-) diff --git a/Source/OpenTK/Platform/X11/XI2Mouse.cs b/Source/OpenTK/Platform/X11/XI2Mouse.cs index 5f9a756e..1b56476f 100644 --- a/Source/OpenTK/Platform/X11/XI2Mouse.cs +++ b/Source/OpenTK/Platform/X11/XI2Mouse.cs @@ -78,16 +78,6 @@ namespace OpenTK.Platform.X11 static readonly Functions.EventPredicate PredicateImpl = IsEventValid; readonly IntPtr Predicate = Marshal.GetFunctionPointerForDelegate(PredicateImpl); - // Store information on a mouse warp event, so it can be ignored. - struct MouseWarp : IEquatable - { - public MouseWarp(double x, double y) { X = x; Y = y; } - double X, Y; - public bool Equals(MouseWarp warp) { return X == warp.X && Y == warp.Y; } - } - MouseWarp? mouse_warp_event; - int mouse_warp_event_count; - static XI2Mouse() { using (new XLock(API.DefaultDisplay)) @@ -316,12 +306,6 @@ namespace OpenTK.Platform.X11 IntPtr.Zero, window.RootWindow, 0, 0, 0, 0, (int)x, (int)y); Interlocked.Exchange(ref cursor_x, (long)x); Interlocked.Exchange(ref cursor_y, (long)y); - - // Mark the expected warp-event so it can be ignored. - if (mouse_warp_event == null) - mouse_warp_event_count = 0; - mouse_warp_event_count++; - mouse_warp_event = new MouseWarp((int)x, (int)y); } }