kathenas / rpms / mutter

Forked from rpms/mutter 5 years ago
Clone

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

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