mirror of
https://github.com/brl/mutter.git
synced 2024-11-28 02:50:41 -05:00
main: be more aggressive in assuming X11 backend
If the session is started by vncserver right now, the XDG_SESSION_TYPE won't be X11. Ideally that would be fixed, but for backward compatibility we should default to X11 if the session type isn't set to wayland explicitly.
This commit is contained in:
parent
d720a0a366
commit
e4da08218a
@ -332,7 +332,6 @@ find_session_type (void)
|
|||||||
char *session_id;
|
char *session_id;
|
||||||
char *session_type;
|
char *session_type;
|
||||||
const char *session_type_env;
|
const char *session_type_env;
|
||||||
gboolean is_tty = FALSE;
|
|
||||||
int ret, i;
|
int ret, i;
|
||||||
|
|
||||||
ret = sd_pid_get_session (0, &session_id);
|
ret = sd_pid_get_session (0, &session_id);
|
||||||
@ -345,8 +344,7 @@ find_session_type (void)
|
|||||||
{
|
{
|
||||||
if (session_type_is_supported (session_type))
|
if (session_type_is_supported (session_type))
|
||||||
goto out;
|
goto out;
|
||||||
else
|
|
||||||
is_tty = g_strcmp0 (session_type, "tty") == 0;
|
|
||||||
free (session_type);
|
free (session_type);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -378,8 +376,8 @@ find_session_type (void)
|
|||||||
goto out;
|
goto out;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Legacy support for starting through xinit */
|
/* Legacy support for starting through xinit or vncserver */
|
||||||
if (is_tty && (g_getenv ("MUTTER_DISPLAY") || g_getenv ("DISPLAY")))
|
if (g_getenv ("MUTTER_DISPLAY") || g_getenv ("DISPLAY"))
|
||||||
{
|
{
|
||||||
session_type = strdup ("x11");
|
session_type = strdup ("x11");
|
||||||
goto out;
|
goto out;
|
||||||
|
Loading…
Reference in New Issue
Block a user