|
@@ -956,7 +956,6 @@ void _glfwPlatformSetWindowTitle(_GLFWwindow* window, const char* title)
|
|
|
void _glfwPlatformSetWindowSize(_GLFWwindow* window, int width, int height)
|
|
|
{
|
|
|
int mode = 0, rate, sizeChanged = GL_FALSE;
|
|
|
- XSizeHints* sizehints;
|
|
|
|
|
|
rate = window->refreshRate;
|
|
|
|
|
@@ -970,14 +969,14 @@ void _glfwPlatformSetWindowSize(_GLFWwindow* window, int width, int height)
|
|
|
{
|
|
|
// Update window size restrictions to match new window size
|
|
|
|
|
|
- sizehints = XAllocSizeHints();
|
|
|
- sizehints->flags = 0;
|
|
|
+ XSizeHints* hints = XAllocSizeHints();
|
|
|
|
|
|
- sizehints->min_width = sizehints->max_width = width;
|
|
|
- sizehints->min_height = sizehints->max_height = height;
|
|
|
+ hints->flags |= (PMinSize | PMaxSize);
|
|
|
+ hints->min_width = hints->max_width = width;
|
|
|
+ hints->min_height = hints->max_height = height;
|
|
|
|
|
|
- XSetWMNormalHints(_glfwLibrary.X11.display, window->X11.handle, sizehints);
|
|
|
- XFree(sizehints);
|
|
|
+ XSetWMNormalHints(_glfwLibrary.X11.display, window->X11.handle, hints);
|
|
|
+ XFree(hints);
|
|
|
}
|
|
|
|
|
|
// Change window size before changing fullscreen mode?
|