-
Notifications
You must be signed in to change notification settings - Fork 5.7k
Description
I am using Ubuntu 25.10 with wayland and am having trouble getting the key callback to receive a GLFW_REPEAT action. I have confirmed the problem with Ubuntu’s GLFW 3.4 package, compiling 3.4 from source, and GLFW git. I eventually discovered that test/events.c shows the repeat events and does not have the same problem. However, I couldn’t get examples/triangle-opengl.c to print a message after modifying it’s key callback to print a message when action==GLFW_REPEAT.
After trying to figure out the difference between the two programs, I learned how to make tests/events.c have the problem: Call glfwSwapBuffers() in the loop immediately above the glfwWindowShouldClose() if statement.
I have found that I can make the problem go away by either:
- Adding glfwInitHint(GLFW_PLATFORM, GLFW_PLATFORM_X11); before glfwInit() in events.c
- Switching to the nouveau driver (instead of nvidia-driver-580-open)
I have confirmed that the problem happens on two different Ubuntu 25.10 machines, both with nvidia cards. However, I haven't tested with other cards.
Forum discussion: https://discourse.glfw.org/t/glfw-repeat-not-triggering-when-glfwswapbuffers-is-repeatedly-called/2975