mirror of
https://github.com/Ryujinx/Opentk.git
synced 2024-12-25 17:25:27 +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);
|
||||||
|
|
Loading…
Reference in a new issue