Download raw body.
fail early in mesa/eglInitialize when on wayland
On Sat, Nov 01, 2025 at 06:33:19PM +0100, Landry Breuil wrote:
> hi,
>
> currently mesa isnt built with wayland support (which is a topic in itself).
> When running on wayland, starting any gtk+4 app will crash early when
> initializing, because we end up taking a libxcb codepath, eg run gtk+4-demo:
[...]
> so, how about the following diff, for now ?
As discussed a few minutes ago, makes sense to me as a temporary (tm)
measure. ok jca@ fwiw.
> Landry
>
> diff --git a/lib/mesa/src/egl/drivers/dri2/egl_dri2.c b/lib/mesa/src/egl/drivers/dri2/egl_dri2.c
> index a9273f6d0..d7b0bd775 100644
> --- a/lib/mesa/src/egl/drivers/dri2/egl_dri2.c
> +++ b/lib/mesa/src/egl/drivers/dri2/egl_dri2.c
> @@ -888,6 +888,8 @@ dri2_initialize(_EGLDisplay *disp)
> break;
> case _EGL_PLATFORM_X11:
> case _EGL_PLATFORM_XCB:
> + if (getenv("WAYLAND_DISPLAY") || getenv("WAYLAND_SOCKET"))
> + return EGL_FALSE;
> ret = dri2_initialize_x11(disp);
> break;
> case _EGL_PLATFORM_DRM:
>
--
jca
fail early in mesa/eglInitialize when on wayland