glfw icon indicating copy to clipboard operation
glfw copied to clipboard

Platform: Prefer Wayland over X11

Open cbix opened this issue 3 years ago • 1 comments

When GLFW_ANY_PLATFORM is used (which is the default) native Wayland would previously never be chosen if XWayland is also available.

Another idea (TBD) would be to control this behavior by an environment variable (see Qt or Firefox) and otherwise default to X11.

cbix avatar Jan 30 '22 00:01 cbix

When GLFW_ANY_PLATFORM is used (which is the default) native Wayland would previously never be chosen if XWayland is also available.

This is on purpose, as the X11 backend is still much more complete than the Wayland one. Working on bringing the Wayland one up to speed now. The change in this PR will be made once the Wayland backend is sufficiently complete. (This is why Wayland is listed before X11 everywhere in the runtime platform selection other than in this array).

Thank you for the PR! Hope to be able to merge it soon.

Another idea (TBD) would be to control this behavior by an environment variable (see Qt or Firefox) and otherwise default to X11.

Yeah, a GLFW_PLATFORM environment variable may be a good addition. Note that you can select Wayland already by un-setting the DISPLAY environment variable.

env -u DISPLAY ./my/app

elmindreda avatar Jan 31 '22 20:01 elmindreda

This has been merged as 65102e20059853bb57c3e8eff91c756b22c2a395. Thank you for the PR!

elmindreda avatar Feb 20 '24 11:02 elmindreda

Thanks, looking forward to 3.4! :)

cbix avatar Feb 21 '24 21:02 cbix