mirror of
https://github.com/glfw/glfw.git
synced 2026-09-18 22:55:46 +00:00
Added missing flags for size hints.
This commit is contained in:
+6
-7
@@ -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?
|
||||
|
||||
Reference in New Issue
Block a user