Add GDK_DEBUG as default environment variable for linux

Since gtk 4.14, we need to define driver to run OpenGL as (gtk's issue)[https://gitlab.gnome.org/GNOME/gtk/-/issues/6589]
This commit is contained in:
Severus
2024-05-08 23:50:08 +07:00
parent 18e5382909
commit b33190131f

View File

@ -239,6 +239,8 @@ pub const GlobalState = struct {
self.logging = .{ .disabled = {} };
}
// We need to export GDK_DEBUG to run on wayland after gtk 4.14
if (builtin.target.os.tag == .linux) _ = internal_os.setenv("GDK_DEBUG", "opengl,gl-disable-gles");
// I don't love the env var name but I don't have it in my heart
// to parse CLI args 3 times (once for actions, once for config,
// maybe once for logging) so for now this is an easy way to do