Only warn about Wayland's inadequacy once

This commit is contained in:
Kovid Goyal 2021-02-26 19:21:48 +05:30
parent ce3cd691cc
commit 12d7c7314a
No known key found for this signature in database
GPG key ID: 06BC317B515ACE7C

9
glfw/wl_window.c vendored
View file

@ -1005,9 +1005,12 @@ void _glfwPlatformGetWindowPos(_GLFWwindow* window UNUSED, int* xpos UNUSED, int
{
// A Wayland client is not aware of its position, so just warn and leave it
// as (0, 0)
_glfwInputError(GLFW_FEATURE_UNAVAILABLE,
"Wayland: The platform does not provide the window position");
static bool warned_once = false;
if (!warned_once) {
_glfwInputError(GLFW_FEATURE_UNAVAILABLE,
"Wayland: The platform does not provide the window position");
warned_once = true;
}
}
void _glfwPlatformSetWindowPos(_GLFWwindow* window UNUSED, int xpos UNUSED, int ypos UNUSED)