mirror of
https://github.com/Ryujinx/Opentk.git
synced 2025-01-11 05:55:49 +00:00
[KMS] Implemented INativeWindow.PointToClient/Screen
This commit is contained in:
parent
4c6bb7a38e
commit
015acba313
|
@ -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)
|
||||||
|
|
Loading…
Reference in a new issue