Blame SOURCES/0001-Make-screen-cast-and-remote-desktop-non-experimental.patch

776610
From 19539bd93c521002222a895dca3abf3f3c46a1b5 Mon Sep 17 00:00:00 2001
776610
From: =?UTF-8?q?Jonas=20=C3=85dahl?= <jadahl@gmail.com>
776610
Date: Thu, 7 Jun 2018 10:21:06 +0200
776610
Subject: [PATCH] Make screen cast and remote desktop non-experimental
776610
776610
It's time to make this feature more accessible by not requiring editing
776610
an array in gsettings.
776610
---
776610
 data/org.gnome.mutter.gschema.xml.in |  4 ---
776610
 src/backends/meta-backend.c          | 51 ++--------------------------
776610
 src/backends/meta-settings-private.h |  4 +--
776610
 src/backends/meta-settings.c         |  4 ---
776610
 4 files changed, 3 insertions(+), 60 deletions(-)
776610
776610
diff --git a/data/org.gnome.mutter.gschema.xml.in b/data/org.gnome.mutter.gschema.xml.in
776610
index d926312c89..6cbd9c1b50 100644
776610
--- a/data/org.gnome.mutter.gschema.xml.in
776610
+++ b/data/org.gnome.mutter.gschema.xml.in
776610
@@ -120,10 +120,6 @@
776610
                                         framebuffers instead of window content,
776610
                                         to manage HiDPI monitors. Does not
776610
                                         require a restart.
776610
-        • “remote-desktop”            — enables remote desktop support. To support
776610
-                                        remote desktop with screen sharing,
776610
-                                        “screen-cast” must also be enabled.
776610
-        • “screen-cast”               — enables screen cast support.
776610
       </description>
776610
     </key>
776610
 
776610
diff --git a/src/backends/meta-backend.c b/src/backends/meta-backend.c
776610
index 4ebceb4ea6..b523a91d4d 100644
776610
--- a/src/backends/meta-backend.c
776610
+++ b/src/backends/meta-backend.c
776610
@@ -402,28 +402,6 @@ meta_backend_create_input_settings (MetaBackend *backend)
776610
   return META_BACKEND_GET_CLASS (backend)->create_input_settings (backend);
776610
 }
776610
 
776610
-#ifdef HAVE_REMOTE_DESKTOP
776610
-static gboolean
776610
-is_screen_cast_enabled (MetaBackend *backend)
776610
-{
776610
-  MetaSettings *settings = meta_backend_get_settings (backend);
776610
-
776610
-  return meta_settings_is_experimental_feature_enabled (
776610
-    settings,
776610
-    META_EXPERIMENTAL_FEATURE_SCREEN_CAST);
776610
-}
776610
-
776610
-static gboolean
776610
-is_remote_desktop_enabled (MetaBackend *backend)
776610
-{
776610
-  MetaSettings *settings = meta_backend_get_settings (backend);
776610
-
776610
-  return meta_settings_is_experimental_feature_enabled (
776610
-    settings,
776610
-    META_EXPERIMENTAL_FEATURE_REMOTE_DESKTOP);
776610
-}
776610
-#endif /* HAVE_REMOTE_DESKTOP */
776610
-
776610
 static void
776610
 meta_backend_real_post_init (MetaBackend *backend)
776610
 {
776610
@@ -457,10 +435,8 @@ meta_backend_real_post_init (MetaBackend *backend)
776610
 
776610
 #ifdef HAVE_REMOTE_DESKTOP
776610
   priv->dbus_session_watcher = g_object_new (META_TYPE_DBUS_SESSION_WATCHER, NULL);
776610
-  if (is_screen_cast_enabled (backend))
776610
-    priv->screen_cast = meta_screen_cast_new (priv->dbus_session_watcher);
776610
-  if (is_remote_desktop_enabled (backend))
776610
-    priv->remote_desktop = meta_remote_desktop_new (priv->dbus_session_watcher);
776610
+  priv->screen_cast = meta_screen_cast_new (priv->dbus_session_watcher);
776610
+  priv->remote_desktop = meta_remote_desktop_new (priv->dbus_session_watcher);
776610
 #endif /* HAVE_REMOTE_DESKTOP */
776610
 
776610
   if (!meta_monitor_manager_is_headless (priv->monitor_manager))
776610
@@ -552,26 +528,6 @@ meta_backend_class_init (MetaBackendClass *klass)
776610
   stage_views_disabled = g_strcmp0 (mutter_stage_views, "0") == 0;
776610
 }
776610
 
776610
-static void
776610
-experimental_features_changed (MetaSettings            *settings,
776610
-                               MetaExperimentalFeature  old_experimental_features,
776610
-                               MetaBackend             *backend)
776610
-{
776610
-#ifdef HAVE_REMOTE_DESKTOP
776610
-  MetaBackendPrivate *priv = meta_backend_get_instance_private (backend);
776610
-
776610
-  if (is_screen_cast_enabled (backend) && !priv->screen_cast)
776610
-    priv->screen_cast = meta_screen_cast_new (priv->dbus_session_watcher);
776610
-  else if (!is_screen_cast_enabled (backend))
776610
-    g_clear_object (&priv->screen_cast);
776610
-
776610
-  if (is_remote_desktop_enabled (backend) && !priv->remote_desktop)
776610
-    priv->remote_desktop = meta_remote_desktop_new (priv->dbus_session_watcher);
776610
-  else if (!is_remote_desktop_enabled (backend))
776610
-    g_clear_object (&priv->remote_desktop);
776610
-#endif /* HAVE_REMOTE_DESKTOP */
776610
-}
776610
-
776610
 static MetaMonitorManager *
776610
 meta_backend_create_monitor_manager (MetaBackend *backend,
776610
                                      GError     **error)
776610
@@ -599,9 +555,6 @@ meta_backend_initable_init (GInitable     *initable,
776610
   MetaBackendPrivate *priv = meta_backend_get_instance_private (backend);
776610
 
776610
   priv->settings = meta_settings_new (backend);
776610
-  g_signal_connect (priv->settings, "experimental-features-changed",
776610
-                    G_CALLBACK (experimental_features_changed),
776610
-                    backend);
776610
 
776610
   priv->egl = g_object_new (META_TYPE_EGL, NULL);
776610
 
776610
diff --git a/src/backends/meta-settings-private.h b/src/backends/meta-settings-private.h
776610
index a8cb6a5499..90bfb439f0 100644
776610
--- a/src/backends/meta-settings-private.h
776610
+++ b/src/backends/meta-settings-private.h
776610
@@ -31,9 +31,7 @@ typedef enum _MetaExperimentalFeature
776610
 {
776610
   META_EXPERIMENTAL_FEATURE_NONE = 0,
776610
   META_EXPERIMENTAL_FEATURE_SCALE_MONITOR_FRAMEBUFFER = (1 << 0),
776610
-  META_EXPERIMENTAL_FEATURE_SCREEN_CAST = (1 << 1),
776610
-  META_EXPERIMENTAL_FEATURE_REMOTE_DESKTOP  = (1 << 2),
776610
-  META_EXPERIMENTAL_FEATURE_KMS_MODIFIERS = (1 << 3),
776610
+  META_EXPERIMENTAL_FEATURE_KMS_MODIFIERS  = (1 << 1),
776610
 } MetaExperimentalFeature;
776610
 
776610
 #define META_TYPE_SETTINGS (meta_settings_get_type ())
776610
diff --git a/src/backends/meta-settings.c b/src/backends/meta-settings.c
776610
index 6f47c5f58c..a73850ed67 100644
776610
--- a/src/backends/meta-settings.c
776610
+++ b/src/backends/meta-settings.c
776610
@@ -263,10 +263,6 @@ experimental_features_handler (GVariant *features_variant,
776610
       /* So far no experimental features defined. */
776610
       if (g_str_equal (feature, "scale-monitor-framebuffer"))
776610
         features |= META_EXPERIMENTAL_FEATURE_SCALE_MONITOR_FRAMEBUFFER;
776610
-      else if (g_str_equal (feature, "screen-cast"))
776610
-        features |= META_EXPERIMENTAL_FEATURE_SCREEN_CAST;
776610
-      else if (g_str_equal (feature, "remote-desktop"))
776610
-        features |= META_EXPERIMENTAL_FEATURE_REMOTE_DESKTOP;
776610
       else if (g_str_equal (feature, "kms-modifiers"))
776610
         features |= META_EXPERIMENTAL_FEATURE_KMS_MODIFIERS;
776610
       else
776610
-- 
776610
2.17.1
776610