mirror of
https://github.com/glfw/glfw.git
synced 2025-10-02 21:00:57 +00:00
Adding checks to avoid desktop environment freeze for waitForVisibilityNotify
This commit is contained in:
parent
96f9f5c4b9
commit
85eb6e4876
@ -162,10 +162,12 @@ GLFWAPI GLFWwindow* glfwCreateWindow(int width, int height,
|
||||
assert(title != NULL);
|
||||
assert(width >= 0);
|
||||
assert(height >= 0);
|
||||
assert(width <= 32767);
|
||||
assert(height <= 32767);
|
||||
|
||||
_GLFW_REQUIRE_INIT_OR_RETURN(NULL);
|
||||
|
||||
if (width <= 0 || height <= 0)
|
||||
if (width <= 0 || height <= 0 || width > 32767 || height > 32767)
|
||||
{
|
||||
_glfwInputError(GLFW_INVALID_VALUE,
|
||||
"Invalid window size %ix%i",
|
||||
@ -941,10 +943,12 @@ GLFWAPI void glfwSetWindowMonitor(GLFWwindow* wh,
|
||||
assert(window != NULL);
|
||||
assert(width >= 0);
|
||||
assert(height >= 0);
|
||||
assert(width <= 32767);
|
||||
assert(height <= 32767);
|
||||
|
||||
_GLFW_REQUIRE_INIT();
|
||||
|
||||
if (width <= 0 || height <= 0)
|
||||
if (width <= 0 || height <= 0 || width > 32767 || height > 32767)
|
||||
{
|
||||
_glfwInputError(GLFW_INVALID_VALUE,
|
||||
"Invalid window size %ix%i",
|
||||
|
Loading…
Reference in New Issue
Block a user