From 12d7c7314a691f442ea8b08e1294712dfcd64069 Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Fri, 26 Feb 2021 19:21:48 +0530 Subject: [PATCH] Only warn about Wayland's inadequacy once --- glfw/wl_window.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/glfw/wl_window.c b/glfw/wl_window.c index 946720d70..c3b897602 100644 --- a/glfw/wl_window.c +++ b/glfw/wl_window.c @@ -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)