Change client_rectangle to client_size

The Location part of client_rectangle was never used.
This commit is contained in:
Fraser Waters 2017-07-30 21:22:33 +01:00
parent 26fac6f032
commit 5213ec200e

View file

@ -109,7 +109,8 @@ namespace OpenTK.Platform.X11
private static readonly IntPtr _atom_toggle = (IntPtr)2;
#pragma warning disable 649 // never assigned, compiler bug in Mono 3.4.0
private Rectangle bounds, client_rectangle;
private Rectangle bounds;
private Size client_size;
#pragma warning restore 649
private int border_left, border_right, border_top, border_bottom;
private Icon icon;
@ -797,7 +798,7 @@ namespace OpenTK.Platform.X11
// when the window is minimized. Many apps
// do not expect this and crash, so clamp
// minimum width/height to 1 instead.
client_rectangle.Size = new Size(
client_size = new Size(
Math.Max(e.ConfigureEvent.width, 1),
Math.Max(e.ConfigureEvent.height, 1));
OnResize(EventArgs.Empty);
@ -1261,11 +1262,11 @@ namespace OpenTK.Platform.X11
{
get
{
return client_rectangle.Size;
return client_size;
}
set
{
bool is_size_changed = client_rectangle.Size != value;
bool is_size_changed = client_size != value;
if (is_size_changed)
{
int width = value.Width;