Prevent resizing smaller than 1×1

This commit is contained in:
Emmanuel Gil Peyrot 2018-01-29 05:06:23 +01:00 committed by linkmauve
parent a8e551cffa
commit 2926ce4838

View File

@ -63,6 +63,10 @@ static void handleConfigure(void* data,
width -= _GLFW_DECORATION_HORIZONTAL;
height -= _GLFW_DECORATION_VERTICAL;
}
if (width < 1)
width = 1;
if (height < 1)
height = 1;
if (window->numer != GLFW_DONT_CARE && window->denom != GLFW_DONT_CARE)
{