glfw-rs icon indicating copy to clipboard operation
glfw-rs copied to clipboard

Version 0.46 tries to create a Wayland window by default

Open cloudhead opened this issue 3 years ago • 7 comments

Since Wayland support was added, it seems like glfw will try to create a wayland window by default. This is because the "wayland" feature is active by default. Disabling it requires using default-features: false on glfw.

Was this the intent? It seems like it might be easier to have it off by default, and activate by just using features = ["wayland"].

cloudhead avatar Nov 06 '22 22:11 cloudhead

Broke it, fixed it, PRed it. #518.

Frostie314159 avatar Dec 13 '22 08:12 Frostie314159

Until this #518 is merged, just replace glfw = "0.47.0" with glfw = { git = "https://github.com/Frostie314159/glfw-rs-wayland-patch.git"} this temporarily points glfw to my fork with the fix.

Frostie314159 avatar Dec 15 '22 11:12 Frostie314159

The #518 just got merged, until it is published point it to the main branch.

Frostie314159 avatar Dec 22 '22 18:12 Frostie314159

Why do these bindings default to X11? Upstream GLFW will default to Wayland in the next release (well, iirc), and the only major issues that I know of are not having CSDs on GNOME and Weston, which is also fixed in the latest commits.

orowith2os avatar Jul 03 '23 08:07 orowith2os

When I wrote the patch, I wasn't aware of the change. But feel free to revert the change with a PR.

Frostie314159 avatar Jul 03 '23 22:07 Frostie314159

If we want to default to wayland, then we should have an x11 feature that can be turned on. Either way, doesn't really matter as long as it's easy to switch between the two without disabling all features.

cloudhead avatar Jul 05 '23 09:07 cloudhead

Since writing the patch, I've taken a break from writing graphics related stuff and doing more networking. I'm probably not available to write the PR, although it should be a fairly trivial change.

Frostie314159 avatar Jul 05 '23 11:07 Frostie314159