[mutter] monitor-config-manager: Add underscanning to MetaMonitorConfig
- From: Jonas Ådahl <jadahl src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [mutter] monitor-config-manager: Add underscanning to MetaMonitorConfig
- Date: Wed, 25 Jan 2017 08:39:42 +0000 (UTC)
commit e8197e8e059c7bd92333771f871a5de1c9b36523
Author: Jonas Ådahl <jadahl gmail com>
Date: Tue Jan 17 10:59:24 2017 +0800
monitor-config-manager: Add underscanning to MetaMonitorConfig
Set the underscanning state via the monitor config struct so that it
can be configured.
https://bugzilla.gnome.org/show_bug.cgi?id=777732
src/backends/meta-monitor-config-manager.c | 5 +++--
src/backends/meta-monitor-config-manager.h | 1 +
src/backends/meta-monitor.c | 10 ++++++++++
src/backends/meta-monitor.h | 2 ++
4 files changed, 16 insertions(+), 2 deletions(-)
---
diff --git a/src/backends/meta-monitor-config-manager.c b/src/backends/meta-monitor-config-manager.c
index d96baf7..6eabb80 100644
--- a/src/backends/meta-monitor-config-manager.c
+++ b/src/backends/meta-monitor-config-manager.c
@@ -181,7 +181,7 @@ assign_monitor_crtc (MetaMonitor *monitor,
.output = output,
.is_primary = assign_output_as_primary,
.is_presentation = assign_output_as_presentation,
- .is_underscanning = output->is_underscanning
+ .is_underscanning = data->monitor_config->is_underscanning
};
g_ptr_array_add (data->crtc_infos, crtc_info);
@@ -453,7 +453,8 @@ create_monitor_config (MetaMonitor *monitor,
monitor_config = g_new0 (MetaMonitorConfig, 1);
*monitor_config = (MetaMonitorConfig) {
.monitor_spec = meta_monitor_spec_clone (monitor_spec),
- .mode_spec = g_memdup (mode_spec, sizeof (MetaMonitorModeSpec))
+ .mode_spec = g_memdup (mode_spec, sizeof (MetaMonitorModeSpec)),
+ .is_underscanning = meta_monitor_is_underscanning (monitor)
};
return monitor_config;
diff --git a/src/backends/meta-monitor-config-manager.h b/src/backends/meta-monitor-config-manager.h
index c5587df..2c5d5ba 100644
--- a/src/backends/meta-monitor-config-manager.h
+++ b/src/backends/meta-monitor-config-manager.h
@@ -33,6 +33,7 @@ typedef struct _MetaMonitorConfig
{
MetaMonitorSpec *monitor_spec;
MetaMonitorModeSpec *mode_spec;
+ gboolean is_underscanning;
} MetaMonitorConfig;
typedef struct _MetaLogicalMonitorConfig
diff --git a/src/backends/meta-monitor.c b/src/backends/meta-monitor.c
index 8238b43..b5ad947 100644
--- a/src/backends/meta-monitor.c
+++ b/src/backends/meta-monitor.c
@@ -187,6 +187,16 @@ meta_monitor_is_primary (MetaMonitor *monitor)
}
gboolean
+meta_monitor_is_underscanning (MetaMonitor *monitor)
+{
+ MetaOutput *output;
+
+ output = meta_monitor_get_main_output (monitor);
+
+ return output->is_underscanning;
+}
+
+gboolean
meta_monitor_is_laptop_panel (MetaMonitor *monitor)
{
MetaOutput *output;
diff --git a/src/backends/meta-monitor.h b/src/backends/meta-monitor.h
index d38b766..9494be8 100644
--- a/src/backends/meta-monitor.h
+++ b/src/backends/meta-monitor.h
@@ -93,6 +93,8 @@ MetaOutput * meta_monitor_get_main_output (MetaMonitor *monitor);
gboolean meta_monitor_is_primary (MetaMonitor *monitor);
+gboolean meta_monitor_is_underscanning (MetaMonitor *monitor);
+
gboolean meta_monitor_is_laptop_panel (MetaMonitor *monitor);
GList * meta_monitor_get_outputs (MetaMonitor *monitor);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]