Merge pull request #1 from elisee/fix-client-rectangle-setter
Fix ClientRectangle setter on Windows (WinGL) & Linux (X11)
This commit is contained in:
parent
a665122202
commit
9a39949249
2 changed files with 7 additions and 1 deletions
|
@ -730,7 +730,11 @@ namespace OpenTK.Platform.Windows
|
|||
}
|
||||
set
|
||||
{
|
||||
ClientSize = value.Size;
|
||||
WindowStyle style = (WindowStyle)Functions.GetWindowLong(window.WindowHandle, GetWindowLongOffsets.STYLE);
|
||||
Win32Rectangle rect = Win32Rectangle.From(value);
|
||||
Functions.AdjustWindowRect(ref rect, style, false);
|
||||
Location = new Point(rect.left, rect.top);
|
||||
Size = new Size(rect.Width, rect.Height);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -994,6 +994,8 @@ namespace OpenTK.Platform.X11
|
|||
{
|
||||
using (new XLock(window.Display))
|
||||
{
|
||||
Functions.XMoveWindow(window.Display, window.WindowHandle,
|
||||
value.X, value.Y);
|
||||
Functions.XResizeWindow(window.Display, window.WindowHandle,
|
||||
value.Width, value.Height);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue