Open wired-tomato opened 2 months ago
Just to clarify: this does not actually work unless you manually update GLFW To 3.4?
the window will load up with wayland on GLFW 3.3+ (default for 1.20.1+), the icon won't load unless GLFW version 3.4+ (default for mc 1.21) is in use, everything else should work fine
notably there is a GLFW error printed to the console 65548: Wayland: The platform does not support setting the cursor position
when opening inventories & some other screens, however it does not cause any crashes or actual issues and can be solved with a mixin as demonstrated in my fabric wayland compat mod WayGL
I am against merging this like this, since it feels extremely convoluted to set a window icon using an externally written file & spawned process.
There's apparently a Wayland proposal to be sane about setting window icons. Once that has been merged, I'd hope GLFW will just support this natively: https://gitlab.freedesktop.org/wayland/wayland-protocols/-/merge_requests/269
Regardless of the window icon, setting the app_id is fine.
The rest of it, I do not want a separate window provider for this. It feels unnecessary and just complicates the code.
glfwWindowHint(GLFW_FOCUS_ON_SHOW, GLFW_FALSE);
Why is this actually necessary for Wayland support?
p.s.: Anything that is actually necessary for basic support of Wayland seems to just require a few lines in the current earlydisplay provider, and we can do that. Enabling wayland, for example, could simply be done via CLI args.
I will try to test this on WSL2 l. Wish me luck.
I think this is way easier to merge now. I'll test it out as soon as I can.
Soooo.. How's the testing going :3
Wayland early display window implementation, requested in #98