From fef2ecd1e22ea88d8fa82c0488ac206b40cd838e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jonas=20=C3=85dahl?= Date: Wed, 12 Dec 2018 11:32:11 +0100 Subject: [PATCH] screen-cast-monitor-stream: Don't pass monitor manager when creating It can be fetched indirectly from the monitor already. https://gitlab.gnome.org/GNOME/mutter/merge_requests/357 --- src/backends/meta-screen-cast-monitor-stream.c | 11 ++++++----- src/backends/meta-screen-cast-monitor-stream.h | 9 ++++----- src/backends/meta-screen-cast-session.c | 1 - 3 files changed, 10 insertions(+), 11 deletions(-) diff --git a/src/backends/meta-screen-cast-monitor-stream.c b/src/backends/meta-screen-cast-monitor-stream.c index df43f977c..5a816e4df 100644 --- a/src/backends/meta-screen-cast-monitor-stream.c +++ b/src/backends/meta-screen-cast-monitor-stream.c @@ -105,12 +105,13 @@ meta_screen_cast_monitor_stream_get_monitor (MetaScreenCastMonitorStream *monito } MetaScreenCastMonitorStream * -meta_screen_cast_monitor_stream_new (GDBusConnection *connection, - MetaMonitorManager *monitor_manager, - MetaMonitor *monitor, - ClutterStage *stage, - GError **error) +meta_screen_cast_monitor_stream_new (GDBusConnection *connection, + MetaMonitor *monitor, + ClutterStage *stage, + GError **error) { + MetaGpu *gpu = meta_monitor_get_gpu (monitor); + MetaMonitorManager *monitor_manager = meta_gpu_get_monitor_manager (gpu); MetaScreenCastMonitorStream *monitor_stream; if (!meta_monitor_is_active (monitor)) diff --git a/src/backends/meta-screen-cast-monitor-stream.h b/src/backends/meta-screen-cast-monitor-stream.h index fbf3c77c3..1d24de93a 100644 --- a/src/backends/meta-screen-cast-monitor-stream.h +++ b/src/backends/meta-screen-cast-monitor-stream.h @@ -34,11 +34,10 @@ G_DECLARE_FINAL_TYPE (MetaScreenCastMonitorStream, META, SCREEN_CAST_MONITOR_STREAM, MetaScreenCastStream) -MetaScreenCastMonitorStream * meta_screen_cast_monitor_stream_new (GDBusConnection *connection, - MetaMonitorManager *monitor_manager, - MetaMonitor *monitor, - ClutterStage *stage, - GError **error); +MetaScreenCastMonitorStream * meta_screen_cast_monitor_stream_new (GDBusConnection *connection, + MetaMonitor *monitor, + ClutterStage *stage, + GError **error); ClutterStage * meta_screen_cast_monitor_stream_get_stage (MetaScreenCastMonitorStream *monitor_stream); diff --git a/src/backends/meta-screen-cast-session.c b/src/backends/meta-screen-cast-session.c index d0f5a79d9..3ba59037f 100644 --- a/src/backends/meta-screen-cast-session.c +++ b/src/backends/meta-screen-cast-session.c @@ -301,7 +301,6 @@ handle_record_monitor (MetaDBusScreenCastSession *skeleton, stage = CLUTTER_STAGE (meta_backend_get_stage (backend)); monitor_stream = meta_screen_cast_monitor_stream_new (connection, - monitor_manager, monitor, stage, &error);