[KMS] Implemented INativeWindow.PointToClient/Screen

This commit is contained in:
thefiddler 2014-07-16 14:51:14 +02:00
parent 4c6bb7a38e
commit 015acba313

View file

@ -241,14 +241,27 @@ namespace OpenTK.Platform.Linux
public override Point PointToClient(Point point) public override Point PointToClient(Point point)
{ {
// Todo var origin = Point.Empty;
return point; var display = DisplayDevice.Default;
if (display != null)
{
origin = display.Bounds.Location;
}
var client = Location;
return new Point(point.X + client.X - origin.X, point.Y + client.Y - origin.Y);
} }
public override Point PointToScreen(Point point) public override Point PointToScreen(Point point)
{ {
// Todo var origin = Point.Empty;
return point; var display = DisplayDevice.Default;
if (display != null)
{
origin = display.Bounds.Location;
}
var client = Location;
return new Point(point.X + origin.X - client.X, point.Y + origin.Y - client.Y);
} }
protected override void Dispose(bool disposing) protected override void Dispose(bool disposing)