mirror of
https://github.com/Ryujinx/Opentk.git
synced 2024-12-23 15:25:31 +00:00
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
|
@ -730,7 +730,11 @@ namespace OpenTK.Platform.Windows
|
||||||
}
|
}
|
||||||
set
|
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))
|
using (new XLock(window.Display))
|
||||||
{
|
{
|
||||||
|
Functions.XMoveWindow(window.Display, window.WindowHandle,
|
||||||
|
value.X, value.Y);
|
||||||
Functions.XResizeWindow(window.Display, window.WindowHandle,
|
Functions.XResizeWindow(window.Display, window.WindowHandle,
|
||||||
value.Width, value.Height);
|
value.Width, value.Height);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue