From bea76004717474c84871f605d5a17e95b35a011c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jonas=20=C3=85dahl?= Date: Thu, 4 Apr 2019 18:43:09 +0200 Subject: [PATCH] logical-monitor: Pass output when iterating over CRTCs While not currently used by any users, it'll be useful in future commits. https://gitlab.gnome.org/GNOME/mutter/issues/548 https://gitlab.gnome.org/GNOME/mutter/merge_requests/525 --- src/backends/meta-logical-monitor.c | 1 + src/backends/meta-logical-monitor.h | 1 + src/backends/native/meta-renderer-native.c | 3 +++ 3 files changed, 5 insertions(+) diff --git a/src/backends/meta-logical-monitor.c b/src/backends/meta-logical-monitor.c index 99a35f7f3..580db8194 100644 --- a/src/backends/meta-logical-monitor.c +++ b/src/backends/meta-logical-monitor.c @@ -242,6 +242,7 @@ foreach_crtc (MetaMonitor *monitor, ForeachCrtcData *data = user_data; data->func (data->logical_monitor, + monitor_crtc_mode->output, meta_output_get_assigned_crtc (monitor_crtc_mode->output), data->user_data); diff --git a/src/backends/meta-logical-monitor.h b/src/backends/meta-logical-monitor.h index 0e46b05ce..4532e654c 100644 --- a/src/backends/meta-logical-monitor.h +++ b/src/backends/meta-logical-monitor.h @@ -63,6 +63,7 @@ G_DECLARE_FINAL_TYPE (MetaLogicalMonitor, meta_logical_monitor, GObject) typedef void (* MetaLogicalMonitorCrtcFunc) (MetaLogicalMonitor *logical_monitor, + MetaOutput *output, MetaCrtc *crtc, gpointer user_data); diff --git a/src/backends/native/meta-renderer-native.c b/src/backends/native/meta-renderer-native.c index f44be06fd..2cb3f1cf7 100644 --- a/src/backends/native/meta-renderer-native.c +++ b/src/backends/native/meta-renderer-native.c @@ -584,6 +584,7 @@ typedef struct _GetSupportedKmsFormatsData static void get_supported_kms_formats_crtc_func (MetaLogicalMonitor *logical_monitor, + MetaOutput *output, MetaCrtc *crtc, gpointer user_data) { @@ -1827,6 +1828,7 @@ typedef struct _SetCrtcFbData static void set_crtc_fb_cb (MetaLogicalMonitor *logical_monitor, + MetaOutput *output, MetaCrtc *crtc, gpointer user_data) { @@ -1937,6 +1939,7 @@ typedef struct _FlipCrtcData static void flip_crtc (MetaLogicalMonitor *logical_monitor, + MetaOutput *output, MetaCrtc *crtc, gpointer user_data) {