mirror of
https://github.com/Ryujinx/Opentk.git
synced 2024-12-23 12:35:30 +00:00
[Win] Cleaned up window size/pos properties
This commit is contained in:
parent
f0d0f6e53a
commit
8eae337d93
|
@ -419,8 +419,7 @@ namespace OpenTK.Platform.Windows
|
|||
};
|
||||
|
||||
// Max points GetMouseMovePointsEx can return is 64.
|
||||
int numPoints = 64;
|
||||
|
||||
const int numPoints = 64;
|
||||
MouseMovePoint* movePoints = stackalloc MouseMovePoint[numPoints];
|
||||
|
||||
// GetMouseMovePointsEx fills in movePoints so that the most
|
||||
|
@ -977,7 +976,7 @@ namespace OpenTK.Platform.Windows
|
|||
|
||||
#region Location
|
||||
|
||||
public Point Location
|
||||
public override Point Location
|
||||
{
|
||||
get { return Bounds.Location; }
|
||||
set
|
||||
|
@ -991,7 +990,7 @@ namespace OpenTK.Platform.Windows
|
|||
|
||||
#region Size
|
||||
|
||||
public Size Size
|
||||
public override Size Size
|
||||
{
|
||||
get { return Bounds.Size; }
|
||||
set
|
||||
|
@ -1003,29 +1002,6 @@ namespace OpenTK.Platform.Windows
|
|||
|
||||
#endregion
|
||||
|
||||
#region ClientRectangle
|
||||
|
||||
public Rectangle ClientRectangle
|
||||
{
|
||||
get
|
||||
{
|
||||
if (client_rectangle.Width == 0)
|
||||
client_rectangle.Width = 1;
|
||||
if (client_rectangle.Height == 0)
|
||||
client_rectangle.Height = 1;
|
||||
return client_rectangle;
|
||||
}
|
||||
set
|
||||
{
|
||||
WindowStyle style = (WindowStyle)Functions.GetWindowLong(window.Handle, GetWindowLongOffsets.STYLE);
|
||||
Win32Rectangle rect = Win32Rectangle.From(value);
|
||||
Functions.AdjustWindowRect(ref rect, style, false);
|
||||
Size = new Size(rect.Width, rect.Height);
|
||||
}
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region ClientSize
|
||||
|
||||
public override Size ClientSize
|
||||
|
@ -1045,46 +1021,6 @@ namespace OpenTK.Platform.Windows
|
|||
|
||||
#endregion
|
||||
|
||||
#region Width
|
||||
|
||||
public int Width
|
||||
{
|
||||
get { return ClientRectangle.Width; }
|
||||
set { ClientRectangle = new Rectangle(0, 0, value, Height); }
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region Height
|
||||
|
||||
public int Height
|
||||
{
|
||||
get { return ClientRectangle.Height; }
|
||||
set { ClientRectangle = new Rectangle(0, 0, Width, value); }
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region X
|
||||
|
||||
public int X
|
||||
{
|
||||
get { return Location.X; }
|
||||
set { Location = new Point(value, Y); }
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region Y
|
||||
|
||||
public int Y
|
||||
{
|
||||
get { return Location.Y; }
|
||||
set { Location = new Point(X, value); }
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region Icon
|
||||
|
||||
public override Icon Icon
|
||||
|
|
Loading…
Reference in a new issue