Cleanup.
This commit is contained in:
parent
e11a5e3973
commit
3be3f58a92
@ -1010,6 +1010,20 @@ void _glfwPlatformGetWindowSize(_GLFWwindow* window, int* width, int* height)
|
|||||||
|
|
||||||
void _glfwPlatformSetWindowSize(_GLFWwindow* window, int width, int height)
|
void _glfwPlatformSetWindowSize(_GLFWwindow* window, int width, int height)
|
||||||
{
|
{
|
||||||
|
if (window->monitor)
|
||||||
|
{
|
||||||
|
_glfwSetVideoMode(window->monitor, &window->videoMode);
|
||||||
|
|
||||||
|
if (window->x11.overrideRedirect)
|
||||||
|
{
|
||||||
|
GLFWvidmode mode;
|
||||||
|
_glfwPlatformGetVideoMode(window->monitor, &mode);
|
||||||
|
XResizeWindow(_glfw.x11.display, window->x11.handle,
|
||||||
|
mode.width, mode.height);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
if (!window->resizable)
|
if (!window->resizable)
|
||||||
{
|
{
|
||||||
// Update window size restrictions to match new window size
|
// Update window size restrictions to match new window size
|
||||||
@ -1024,20 +1038,8 @@ void _glfwPlatformSetWindowSize(_GLFWwindow* window, int width, int height)
|
|||||||
XFree(hints);
|
XFree(hints);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (window->monitor)
|
|
||||||
{
|
|
||||||
_glfwSetVideoMode(window->monitor, &window->videoMode);
|
|
||||||
|
|
||||||
if (window->x11.overrideRedirect)
|
|
||||||
{
|
|
||||||
GLFWvidmode mode;
|
|
||||||
_glfwPlatformGetVideoMode(window->monitor, &mode);
|
|
||||||
XResizeWindow(_glfw.x11.display, window->x11.handle,
|
|
||||||
mode.width, mode.height);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else
|
|
||||||
XResizeWindow(_glfw.x11.display, window->x11.handle, width, height);
|
XResizeWindow(_glfw.x11.display, window->x11.handle, width, height);
|
||||||
|
}
|
||||||
|
|
||||||
XFlush(_glfw.x11.display);
|
XFlush(_glfw.x11.display);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user