Blame SOURCES/0001-main-be-more-aggressive-in-assuming-X11-backend.patch

1a7f9f
From 99c74360451a85fca9dacad531ed22adbc1b0805 Mon Sep 17 00:00:00 2001
1a7f9f
From: Ray Strode <rstrode@redhat.com>
1a7f9f
Date: Tue, 13 Feb 2018 09:44:50 -0500
1a7f9f
Subject: [PATCH] main: be more aggressive in assuming X11 backend
1a7f9f
1a7f9f
If the session is started by vncserver right now, the
1a7f9f
XDG_SESSION_TYPE won't be X11.  Ideally that would be
1a7f9f
fixed, but for backward compatibility we should default
1a7f9f
to X11 if the session type isn't set to wayland explicitly.
1a7f9f
---
1a7f9f
 src/core/main.c | 8 +++-----
1a7f9f
 1 file changed, 3 insertions(+), 5 deletions(-)
1a7f9f
1a7f9f
diff --git a/src/core/main.c b/src/core/main.c
1a7f9f
index a07dda9ecc..0d241f952b 100644
1a7f9f
--- a/src/core/main.c
1a7f9f
+++ b/src/core/main.c
1a7f9f
@@ -407,7 +407,6 @@ find_session_type (void)
1a7f9f
   char *session_id;
1a7f9f
   char *session_type;
1a7f9f
   const char *session_type_env;
1a7f9f
-  gboolean is_tty = FALSE;
1a7f9f
   int ret, i;
1a7f9f
 
1a7f9f
   ret = sd_pid_get_session (0, &session_id);
1a7f9f
@@ -420,8 +419,7 @@ find_session_type (void)
1a7f9f
         {
1a7f9f
           if (session_type_is_supported (session_type))
1a7f9f
             goto out;
1a7f9f
-          else
1a7f9f
-            is_tty = g_strcmp0 (session_type, "tty") == 0;
1a7f9f
+
1a7f9f
           free (session_type);
1a7f9f
         }
1a7f9f
     }
1a7f9f
@@ -453,8 +451,8 @@ find_session_type (void)
1a7f9f
       goto out;
1a7f9f
     }
1a7f9f
 
1a7f9f
-  /* Legacy support for starting through xinit */
1a7f9f
-  if (is_tty && (g_getenv ("MUTTER_DISPLAY") || g_getenv ("DISPLAY")))
1a7f9f
+  /* Legacy support for starting through xinit or vncserver */
1a7f9f
+  if (g_getenv ("MUTTER_DISPLAY") || g_getenv ("DISPLAY"))
1a7f9f
     {
1a7f9f
       session_type = strdup ("x11");
1a7f9f
       goto out;
1a7f9f
-- 
1a7f9f
2.31.1
1a7f9f