From 4ede3ad2d000debb34ef5c45e51f659408355757 Mon Sep 17 00:00:00 2001 From: thefiddler Date: Thu, 15 May 2014 10:24:03 +0200 Subject: [PATCH] [X11] Renamed XI2Mouse This file now implements both mouse and keyboard input, so its name has been updated to reflect that. --- Source/OpenTK/OpenTK.csproj | 2 +- Source/OpenTK/Platform/X11/X11Factory.cs | 2 +- Source/OpenTK/Platform/X11/X11GLNative.cs | 6 +++--- Source/OpenTK/Platform/X11/XI2Input.cs | 2 +- .../Platform/X11/{XI2Mouse.cs => XI2MouseKeyboard.cs} | 8 ++++---- 5 files changed, 10 insertions(+), 10 deletions(-) rename Source/OpenTK/Platform/X11/{XI2Mouse.cs => XI2MouseKeyboard.cs} (99%) diff --git a/Source/OpenTK/OpenTK.csproj b/Source/OpenTK/OpenTK.csproj index cb5d2df9..2e0a1526 100644 --- a/Source/OpenTK/OpenTK.csproj +++ b/Source/OpenTK/OpenTK.csproj @@ -697,7 +697,6 @@ - Always @@ -802,6 +801,7 @@ + diff --git a/Source/OpenTK/Platform/X11/X11Factory.cs b/Source/OpenTK/Platform/X11/X11Factory.cs index 49494e90..2e5a6634 100644 --- a/Source/OpenTK/Platform/X11/X11Factory.cs +++ b/Source/OpenTK/Platform/X11/X11Factory.cs @@ -41,7 +41,7 @@ namespace OpenTK.Platform.X11 { if (input_driver == null) { - if (XI2Mouse.IsSupported(IntPtr.Zero)) + if (XI2MouseKeyboard.IsSupported(IntPtr.Zero)) { input_driver = new XI2Input(); } diff --git a/Source/OpenTK/Platform/X11/X11GLNative.cs b/Source/OpenTK/Platform/X11/X11GLNative.cs index e51b6f5e..ca15c1c9 100644 --- a/Source/OpenTK/Platform/X11/X11GLNative.cs +++ b/Source/OpenTK/Platform/X11/X11GLNative.cs @@ -247,11 +247,11 @@ namespace OpenTK.Platform.X11 // The XInput2 extension makes keyboard and mouse handling much easier. // Check whether it is available. - xi2_supported = XI2Mouse.IsSupported(window.Display); + xi2_supported = XI2MouseKeyboard.IsSupported(window.Display); if (xi2_supported) { - xi2_opcode = XI2Mouse.XIOpCode; - xi2_version = XI2Mouse.XIVersion; + xi2_opcode = XI2MouseKeyboard.XIOpCode; + xi2_version = XI2MouseKeyboard.XIVersion; } exists = true; diff --git a/Source/OpenTK/Platform/X11/XI2Input.cs b/Source/OpenTK/Platform/X11/XI2Input.cs index 574d7f9e..c2e8528e 100644 --- a/Source/OpenTK/Platform/X11/XI2Input.cs +++ b/Source/OpenTK/Platform/X11/XI2Input.cs @@ -35,7 +35,7 @@ namespace OpenTK.Platform.X11 { class XI2Input : IInputDriver2 { - readonly XI2Mouse mouse_keyboard = new XI2Mouse(); + readonly XI2MouseKeyboard mouse_keyboard = new XI2MouseKeyboard(); readonly X11Joystick joystick = new X11Joystick(); readonly IGamePadDriver gamepad = new MappedGamePadDriver(); diff --git a/Source/OpenTK/Platform/X11/XI2Mouse.cs b/Source/OpenTK/Platform/X11/XI2MouseKeyboard.cs similarity index 99% rename from Source/OpenTK/Platform/X11/XI2Mouse.cs rename to Source/OpenTK/Platform/X11/XI2MouseKeyboard.cs index a76d21f1..1ef31796 100644 --- a/Source/OpenTK/Platform/X11/XI2Mouse.cs +++ b/Source/OpenTK/Platform/X11/XI2MouseKeyboard.cs @@ -34,7 +34,7 @@ using OpenTK.Input; namespace OpenTK.Platform.X11 { - sealed class XI2Mouse : IKeyboardDriver2, IMouseDriver2, IDisposable + sealed class XI2MouseKeyboard : IKeyboardDriver2, IMouseDriver2, IDisposable { const XEventName ExitEvent = XEventName.LASTEvent + 1; readonly object Sync = new object(); @@ -89,7 +89,7 @@ namespace OpenTK.Platform.X11 static readonly Functions.EventPredicate PredicateImpl = IsEventValid; readonly IntPtr Predicate = Marshal.GetFunctionPointerForDelegate(PredicateImpl); - static XI2Mouse() + static XI2MouseKeyboard() { using (new XLock(API.DefaultDisplay)) { @@ -119,7 +119,7 @@ namespace OpenTK.Platform.X11 } } - public XI2Mouse() + public XI2MouseKeyboard() { window = new X11WindowInfo(); @@ -620,7 +620,7 @@ namespace OpenTK.Platform.X11 } } - ~XI2Mouse() + ~XI2MouseKeyboard() { Dispose(false); }