Skip to content

GLFW_REPEAT not triggering when glfwSwapBuffers() is repeatedly called #2793

@skuhl

Description

@skuhl

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:

  1. Adding glfwInitHint(GLFW_PLATFORM, GLFW_PLATFORM_X11); before glfwInit() in events.c
  2. 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

Metadata

Metadata

Assignees

Labels

NvidiaNvidia GPU specific (any OS or driver)WaylandbugBug reports and bugfix pull requests

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions