Skip to content

Avoid unsupported GLFW window position queries on Wayland - #3505

Open
sylvesterkaczmarek wants to merge 1 commit into
google-deepmind:mainfrom
sylvesterkaczmarek:fix/wayland-window-position-warning
Open

Avoid unsupported GLFW window position queries on Wayland#3505
sylvesterkaczmarek wants to merge 1 commit into
google-deepmind:mainfrom
sylvesterkaczmarek:fix/wayland-window-position-warning

Conversation

@sylvesterkaczmarek

Copy link
Copy Markdown
Contributor

Summary

Avoid calling glfwGetWindowPos when Simulate is running on Wayland.

GLFW documents that Wayland clients do not know their global window position, and the current calls generate GLFW_FEATURE_UNAVAILABLE warnings. In the Python passive viewer this surfaces as the warning reported in #2393 and can interfere with viewer interaction depending on the GLFW Python error callback.

This change:

  • adds glfwGetPlatform to Simulate's dynamic GLFW dispatch table when building against GLFW 3.4+
  • detects the Wayland runtime backend
  • skips both window-position queries on Wayland
  • preserves the existing position save/restore path on X11, Windows and macOS
  • preserves previous behaviour when built with older GLFW headers where glfwGetPlatform is unavailable

Fixes #2393.

Validation

The final branch is based directly on current main and contains one focused commit (12a2c02379807151047c4fd918153450f9098ce6).

Final diff:

  • simulate/glfw_adapter.cc: 14 additions, 2 deletions
  • simulate/glfw_dispatch.cc: 3 additions
  • simulate/glfw_dispatch.h: 3 additions

I could not run the Wayland GUI regression locally in this execution environment, so no local runtime test pass is claimed. The change follows the root cause identified in the issue discussion and preserves non-Wayland behaviour.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

GLFW Issue on Ubuntu 24.04

1 participant