}
set
{
- Rectangle old = ClientRectangle;
- ClientRectangle = new Rectangle(old.X, old.Y, value, old.Height);
+ ClientSize = new Size(value, ClientSize.Height);
}
}
}
set
{
- Rectangle old = ClientRectangle;
- Bounds = new Rectangle(old.X, old.Y, old.Width, value);
+ ClientSize = new Size(ClientSize.Width, value);
}
}
}
set
{
+ bool is_size_changed = client_rectangle.Size != value;
+
+ int width = value.Width;
+ int height = value.Height;
+
+ if (WindowBorder != WindowBorder.Resizable)
+ {
+ SetWindowMinMax(width, height, width, height);
+ }
+
using (new XLock(window.Display))
{
- Functions.XResizeWindow(window.Display, window.Handle,
- value.Width, value.Height);
+ if (is_size_changed)
+ {
+ Functions.XResizeWindow(window.Display, window.Handle,
+ width, height);
+ }
}
+
ProcessEvents();
}
}