Skip to content

Commit d75d2a5

Browse files
committed
[Toolkit.Input] Fix minor potential issue in MouseManager
1 parent 232a0a7 commit d75d2a5

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

Source/Toolkit/SharpDX.Toolkit.Input/MousePlatformDesktop.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,8 @@ public MousePlatformDesktop(object nativeWindow) : base(nativeWindow) { }
4242
internal override void SetLocation(Vector2 point)
4343
{
4444
point.Saturate();
45-
Cursor.Position = control.PointToScreen(new System.Drawing.Point((int)(point.X * control.Width), (int)(point.Y * control.Height)));
45+
var clientSize = control.ClientSize;
46+
Cursor.Position = control.PointToScreen(new System.Drawing.Point((int)(point.X * clientSize.Width), (int)(point.Y * clientSize.Height)));
4647
}
4748

4849
/// <summary>

0 commit comments

Comments
 (0)