Closed torokati44 closed 3 years ago
I imagine that we could prefer Wayland if we discover it to be available, over X11, and expect all windows to be Wayland handles.
That seems reasonable to me.
Will the WAYLAND_DISPLAY=''
forced fallback to X11/XWayland still work then, with the added expectation?
No idea. We need to find out!
Commenting because I worked in this recently. For the GL backend I recently added support for wayland (#3545), before that it only supported X (which is the version you are using).
I think the issue you are hitting is actually because of winit - winit by default will prefer to use wayland directly and gives us a wayland window if possible - which obviously causes problems as gfx had only supported X. I’m sure you can force winit to use XWayland which should make things work in your case.
I don’t know if gfx should attempt a fallback here - the issue (which I hit) is that gfx attempts to create a context before we know for use what window manager we will be drawing into. If they don’t match, then the context has to be recreates
I’m sure you can force winit to use XWayland which should make things work in your case.
Yes, I could, and I mentioned this in the original report as well. It's just... How does this work at all for anyone on Wayland (directly) who also has X11 available (via XWayland)? This will be the case for a vast majority of users for many years still, I believe.
Right, the way it currently works on master is it first checks for a wayland session, and if that fails it falls back to X. This previously didn’t work as the GL backend didn’t support Wayland.
Ah, I see. Wasn't aware that this was already changed in master, sorry.
Short info header:
I'd like to give the newly merged GL backend a try, with Ruffle (with a 2-line patch on top of its master, to allow selecting the GL backend). On startup, I get:
But then:
I tried forcing
gfx
to either use only X11 (through XWayland), or only Wayland (natively); but could only do the former, by settingWAYLAND_DISPLAY=''
The same method doesn't work for disabling X11 though(DISPLAY=''
),gfx
will still try to use X11, but will fail to open the display. I also triedEGL_PLATFORM=wayland
, but that didn't seem to do anything.