mirror of
https://github.com/Ryujinx/Opentk.git
synced 2025-07-01 07:48:13 +00:00
Update spacing and formatting to match existing style
This commit is contained in:
parent
ba0180ed77
commit
0df7c55609
|
@ -49,12 +49,15 @@ namespace OpenTK
|
||||||
window_info = Utilities.CreateMacOSCarbonWindowInfo(control.Handle, false, true, GetXOffset, GetYOffset);
|
window_info = Utilities.CreateMacOSCarbonWindowInfo(control.Handle, false, true, GetXOffset, GetYOffset);
|
||||||
}
|
}
|
||||||
|
|
||||||
private int GetXOffset(){
|
private int GetXOffset()
|
||||||
|
{
|
||||||
return control.Location.X;
|
return control.Location.X;
|
||||||
}
|
}
|
||||||
|
|
||||||
private int GetYOffset(){
|
private int GetYOffset()
|
||||||
if (control.TopLevelControl != null) {
|
{
|
||||||
|
if (control.TopLevelControl != null)
|
||||||
|
{
|
||||||
System.Drawing.Point offset = control.PointToScreen (control.Location);
|
System.Drawing.Point offset = control.PointToScreen (control.Location);
|
||||||
System.Drawing.Point windowOffset = control.TopLevelControl.PointToScreen (System.Drawing.Point.Empty);
|
System.Drawing.Point windowOffset = control.TopLevelControl.PointToScreen (System.Drawing.Point.Empty);
|
||||||
int relativeY = offset.Y - windowOffset.Y; //control.TopLevelControl.Location.Y is not the same as windowOffset.Y for some reason.
|
int relativeY = offset.Y - windowOffset.Y; //control.TopLevelControl.Location.Y is not the same as windowOffset.Y for some reason.
|
||||||
|
|
|
@ -270,7 +270,8 @@ namespace OpenTK
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (Configuration.RunningOnMacOS) {
|
if (Configuration.RunningOnMacOS)
|
||||||
|
{
|
||||||
DelayUpdate delay = PerformContextUpdate;
|
DelayUpdate delay = PerformContextUpdate;
|
||||||
BeginInvoke(delay); //Need the native window to resize first otherwise our control will be in the wrong place.
|
BeginInvoke(delay); //Need the native window to resize first otherwise our control will be in the wrong place.
|
||||||
}
|
}
|
||||||
|
@ -287,7 +288,8 @@ namespace OpenTK
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Execute the delayed context update
|
/// Execute the delayed context update
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public void PerformContextUpdate(){
|
public void PerformContextUpdate()
|
||||||
|
{
|
||||||
if (context != null)
|
if (context != null)
|
||||||
context.Update (Implementation.WindowInfo);
|
context.Update (Implementation.WindowInfo);
|
||||||
}
|
}
|
||||||
|
|
|
@ -172,13 +172,6 @@ namespace OpenTK.Platform.MacOS
|
||||||
if (carbonWindow.IsControl == false)
|
if (carbonWindow.IsControl == false)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
// Todo: See if there is a way around using WinForms.
|
|
||||||
//throw new NotImplementedException();
|
|
||||||
/*System.Windows.Forms.Control ctrl = Control.FromHandle(carbonWindow.WindowHandle);
|
|
||||||
|
|
||||||
if (ctrl.TopLevelControl == null)
|
|
||||||
return;*/
|
|
||||||
|
|
||||||
Rect rect = API.GetControlBounds(carbonWindow.WindowHandle);
|
Rect rect = API.GetControlBounds(carbonWindow.WindowHandle);
|
||||||
|
|
||||||
Debug.Print("Setting buffer_rect for control.");
|
Debug.Print("Setting buffer_rect for control.");
|
||||||
|
|
Loading…
Reference in a new issue