Preserve the sign of the mouse position. Fixes issue [#1376]: "mouse position".

This commit is contained in:
the_fiddler 2009-11-16 10:38:49 +00:00
parent c84e3ef0da
commit a8c0c7adf4

View file

@ -293,8 +293,8 @@ namespace OpenTK.Platform.Windows
case WindowMessage.MOUSEMOVE: case WindowMessage.MOUSEMOVE:
Point point = new Point( Point point = new Point(
(int)(lParam.ToInt32() & 0x0000FFFF), (short)((uint)lParam.ToInt32() & 0x0000FFFF),
(int)(lParam.ToInt32() & 0xFFFF0000) >> 16); (short)(((uint)lParam.ToInt32() & 0xFFFF0000) >> 16));
mouse.Position = point; mouse.Position = point;
{ {
if (!ClientRectangle.Contains(point)) if (!ClientRectangle.Contains(point))