Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

LWJGL 3.3.4 GLFW issues on Linux Wayland #998

Closed
generaloss opened this issue Aug 7, 2024 · 6 comments
Closed

LWJGL 3.3.4 GLFW issues on Linux Wayland #998

generaloss opened this issue Aug 7, 2024 · 6 comments

Comments

@generaloss
Copy link

generaloss commented Aug 7, 2024

Version

3.3.4

Platform

Linux x64

JDK

17, 22

Module

GLFW

Bug description

Arch Linux x64 6.10.3-arch1-1, KDE Plasma 6.1.3, Wayland

  • glfwExtensionSupported("GLX_EXT_swap_control_tear") returns true in 3.3.3 | return false in 3.3.4
  • GLFW_CURSOR_HIDDEN and *GLFW_CURSOR_DISABLED * works in 3.3.3 | doesn't work in 3.3.4
  • glfwSetWindowPos works in 3.3.3 | doesn't work in 3.3.4
  • glfwGetWindowPos always returns 0 in 3.3.4
  • window pos callback works in 3.3.3 | doesn't work in 3.3.4
  • glfwSetWindowIcon works in 3.3.3 | doesn't work in 3.3.4
  • Window contents are cut off in 3.3.4
  • Message when libdecor package is installed with 3.3.4:
    "libdecor-gtk-WARNING: Failed to initialize GTK
    Failed to load plugin 'libdecor-gtk.so': failed to init
    "

lwjgl.3.3.3.-.3.3.4.wayland.issues.cut.mp4

Stacktrace or crash log output

No response

@tomwmth
Copy link

tomwmth commented Sep 5, 2024

Similar issue, but with a dialog window displaying the error callback

Platform: Arch Linux x64 6.10.8-arch1-1, KDE Plasma 6.1.4, Wayland

lwjgl.3.3.4.mp4

@kles4enko
Copy link

I had something similar with 3.3.4 binaries on MacOS as well (see: #1000)
It seems that native artifacts for 3.3.4 was compiled in broken CI environment...

@Spasi
Copy link
Member

Spasi commented Sep 7, 2024

Hey,

@kles4enko The MoltenVK issue is known and unrelated. It also has very high priority and I'm trying to prepare the 3.3.5 release asap. In the meantime, the latest snapshot of libMoltenVK.dylib has been fixed and you can use it with 3.3.4 (download the shared library and point to it with -Dorg.lwjgl.vulkan.libname or Configuration.VULKAN_LIBRARY_NAME).

@generaloss The functionality you mention as not working is documented as not supported on Wayland by GLFW itself. For example, the note for glfwSetWindowPos is:

Wayland: There is no way for an application to set the global position of its windows. This function will emit GLFW_FEATURE_UNAVAILABLE.

If you're seeing differences between 3.3.3 and 3.3.4, it may be something else that has changed. Are you sure that the Wayland backend is even used when running on 3.3.3?

@generaloss
Copy link
Author

@Spasi
I’m sure I used the Wayland backend if GLFW in LWJGL 3.3.3 cannot use any installed backend regardless of which one is running. I don’t know how to check it.

@Spasi
Copy link
Member

Spasi commented Sep 7, 2024

@generaloss Try the GLFW_PLATFORM hint with values GLFW_PLATFORM_X11 and GLFW_PLATFORM_WAYLAND. Then call glfwGetPlatform() to see what backend you get.

@generaloss
Copy link
Author

@Spasi Indeed, LWJGL 3.3.3 automatically selects the X11 backend while 3.3.4 selects Wayland.

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

No branches or pull requests

4 participants