The HelloWorld sample at https://www.lwjgl.org/guide incompatible with Wayland

Started by blob, October 29, 2024, 20:13:47

Previous topic - Next topic

blob

The HelloWorld sample at 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


bitlife2org

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