x11: Remove MUTTER_DISPLAY env variable

It is X11 specific and I don't see why it should be used instead of setting
DISPLAY. Nothing seems to set it either in gdm/gnome-session.

Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3762>
This commit is contained in:
Bilal Elmoussaoui 2024-05-21 10:05:21 +02:00 committed by Marge Bot
parent 97af5f8705
commit b8c5ea4e1f
2 changed files with 2 additions and 8 deletions

View File

@ -507,15 +507,9 @@ static void
meta_backend_x11_cm_constructed (GObject *object)
{
MetaBackendX11Cm *x11_cm = META_BACKEND_X11_CM (object);
const char *display_name;
if (x11_cm->display_name)
display_name = (const char *) x11_cm->display_name;
else
display_name = g_getenv ("MUTTER_DISPLAY");
if (display_name)
g_setenv ("DISPLAY", display_name, TRUE);
g_setenv ("DISPLAY", x11_cm->display_name, TRUE);
G_OBJECT_CLASS (meta_backend_x11_cm_parent_class)->constructed (object);
}

View File

@ -216,7 +216,7 @@ find_session_type (GError **error)
}
/* Legacy support for starting through xinit */
if (is_tty && (g_getenv ("MUTTER_DISPLAY") || g_getenv ("DISPLAY")))
if (is_tty && g_getenv ("DISPLAY"))
{
session_type = strdup ("x11");
goto out;