Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

[X11] Removed unused warp detection code

  • Loading branch information...
commit 30d7780f1e071d881974e7b59b6b71439dea92ef 1 parent dd16142
@thefiddler thefiddler authored
Showing with 0 additions and 16 deletions.
  1. +0 −16 Source/OpenTK/Platform/X11/XI2Mouse.cs
View
16 Source/OpenTK/Platform/X11/XI2Mouse.cs
@@ -78,16 +78,6 @@ class XIMouse
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<MouseWarp>
- {
- 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 @@ public void SetPosition(double x, double y)
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);
}
}
Please sign in to comment.
Something went wrong with that request. Please try again.