wgpu icon indicating copy to clipboard operation
wgpu copied to clipboard

egl: recreate Wayland context if X surface is supplied

Open dsseng opened this issue 2 years ago • 0 comments

Connections Link to the issues addressed by this PR, or dependent PRs in other repositories Fixes #2762

Description Describe what problem this is solving, and how it's solved. When user has libwayland and WAYLAND_DISPLAY, wgpu creates EGLDisplay using EGL_PLATFORM_WAYLAND_KHR, which is incompatible with X windows. However, application might use X in Wayland environment, and so its surface will have incompatible type thus leading to panic. In this case reinitialize the EGLDisplay with EGL_PLATFORM_X11_KHR.

Testing Explain how this change is tested. WINIT_UNIX_BACKEND=x11

dsseng avatar Jun 27 '22 08:06 dsseng