1
0
Fork 0
mirror of https://github.com/gwm17/glfw.git synced 2024-10-07 22:57:25 -04:00

Handle maximized size correctly

This commit is contained in:
Emmanuel Gil Peyrot 2017-12-22 17:55:43 +01:00 committed by linkmauve
parent 31cea7fa24
commit f51c219b1c

View File

@ -58,6 +58,12 @@ static void handleConfigure(void* data,
if (!window->monitor)
{
if (window->decorated)
{
width -= 2 * _GLFW_DECORATION_WIDTH;
height -= _GLFW_DECORATION_TOP + _GLFW_DECORATION_WIDTH;
}
if (window->numer != GLFW_DONT_CARE && window->denom != GLFW_DONT_CARE)
{
aspectRatio = (float)width / (float)height;