Skip to content

Re-enable GL backend

Georges Basile Stavracas Neto requested to merge gbsneto/allow-opengl-again into main

On X11, using OpenGL is fine because GTK can pick the right visuals. Using EGL on Wayland is also fine, because EGL gives us visuals with alpha too.

What is not fine, however, is using EGL with X11 displays on Wayland, because in this case, EGL gives us visuals without the alpha channel, which produces black borders.

To work around that, we started to globally set GSK_RENDERER=cairo on startup, which works. But now that the GTK file chooser has a grid view, and the items of this grid view have shadows, the cairo renderer became slow to a crawl.

Turns out, since 2021, GTK4 is much smarter as to when to use EGL, and checks for the alpha channel appropriately. We could have dropped this check more than an year ago!

Stop setting GSK_RENDERER on startup.

Merge request reports