mirror of
https://github.com/Ryujinx/Opentk.git
synced 2024-12-25 05:35:38 +00:00
Fix AGL buffer rectangle when destination control is inside a container inside a form.
This commit is contained in:
parent
3c522d26ee
commit
bc236a7c0b
|
@ -179,9 +179,13 @@ namespace OpenTK.Platform.MacOS
|
||||||
return;
|
return;
|
||||||
|
|
||||||
Rect rect = API.GetControlBounds(carbonWindow.WindowRef);
|
Rect rect = API.GetControlBounds(carbonWindow.WindowRef);
|
||||||
|
System.Windows.Forms.Form frm = (System.Windows.Forms.Form) ctrl.TopLevelControl;
|
||||||
|
|
||||||
rect.X = (short)ctrl.Left;
|
System.Drawing.Point loc =
|
||||||
rect.Y = (short)ctrl.Top;
|
frm.PointToClient(ctrl.PointToScreen(System.Drawing.Point.Empty));
|
||||||
|
|
||||||
|
rect.X = (short)loc.X;
|
||||||
|
rect.Y = (short)loc.Y;
|
||||||
|
|
||||||
Debug.Print("Setting buffer_rect for control.");
|
Debug.Print("Setting buffer_rect for control.");
|
||||||
Debug.Print("MacOS Coordinate Rect: {0}", rect);
|
Debug.Print("MacOS Coordinate Rect: {0}", rect);
|
||||||
|
@ -219,7 +223,7 @@ namespace OpenTK.Platform.MacOS
|
||||||
if (carbonWindow.IsControl)
|
if (carbonWindow.IsControl)
|
||||||
{
|
{
|
||||||
IntPtr controlOwner = API.GetControlOwner(carbonWindow.WindowRef);
|
IntPtr controlOwner = API.GetControlOwner(carbonWindow.WindowRef);
|
||||||
|
|
||||||
windowPort = API.GetWindowPort(controlOwner);
|
windowPort = API.GetWindowPort(controlOwner);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
|
Loading…
Reference in a new issue