LWJGL Forum

Programming => LWJGL Documentation => Topic started by: blob on October 29, 2024, 20:13:47

Title: The HelloWorld sample at https://www.lwjgl.org/guide incompatible with Wayland
Post by: blob on October 29, 2024, 20:13:47
The HelloWorld sample at https://www.lwjgl.org/guide (https://www.lwjgl.org/guide) tries to set the global window position.

// Center the window
glfwSetWindowPos(on
window,
(vidmode.width() - pWidth.get(0)) / 2,
(vidmode.height() - pHeight.get(0)) / 2
);

This is incompatible with Wayland as per GLFW documentation

glfwSetWindowPos docs (https://www.glfw.org/docs/3.3/group__window.html#ga1abb6d690e8c88e0c8cd1751356dbca8)

Title: Re: The HelloWorld sample at https://www.lwjgl.org/guide incompatible with Wayland
Post by: bitlife2org on February 11, 2026, 07:16:17
Wayland does not allow applications to set global window positions, so glfwSetWindowPos will be ignored on Wayland. The HelloWorld sample should clearly mention this platform limitation to avoid confusion for Linux users. Bitlife (https://bitlife2.org)