From 9b3f1dc8ee789987267c2a0f9fa6f26192164753 Mon Sep 17 00:00:00 2001 From: kanato Date: Sun, 28 Dec 2008 05:20:25 +0000 Subject: [PATCH] Set CarbonGLNative to correctly record mouse position. --- Source/OpenTK/Platform/MacOS/CarbonGLNative.cs | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/Source/OpenTK/Platform/MacOS/CarbonGLNative.cs b/Source/OpenTK/Platform/MacOS/CarbonGLNative.cs index dccb9a9f..fea0a6d1 100644 --- a/Source/OpenTK/Platform/MacOS/CarbonGLNative.cs +++ b/Source/OpenTK/Platform/MacOS/CarbonGLNative.cs @@ -221,7 +221,7 @@ namespace OpenTK.Platform.MacOS WeakReference reference = mWindows[userData]; CarbonGLNative window = (CarbonGLNative)reference.Target; - Debug.Print("Processing {0} event for {1}.", evt, window.window); + //Debug.Print("Processing {0} event for {1}.", evt, window.window); if (window == null) { @@ -326,9 +326,10 @@ namespace OpenTK.Platform.MacOS if (pt.Y < mTitlebarHeight) return OSStatus.EventNotHandled; - // TODO: Fix this - //InputDriver.Mouse[0].X = (int)pt.X; - //InputDriver.Mouse[0].Y = (int)pt.Y - mTitlebarHeight; + InputDriver.Mouse[0].Position = + new System.Drawing.Point( + (int)pt.X, + (int)(pt.Y - mTitlebarHeight)); switch(evt.MouseEventKind) {