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
This commit is contained in:
Jonas Ådahl 2017-01-17 10:59:24 +08:00
parent 7fc6b8a746
commit e8197e8e05
4 changed files with 16 additions and 2 deletions

View File

@ -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;

View File

@ -33,6 +33,7 @@ typedef struct _MetaMonitorConfig
{
MetaMonitorSpec *monitor_spec;
MetaMonitorModeSpec *mode_spec;
gboolean is_underscanning;
} MetaMonitorConfig;
typedef struct _MetaLogicalMonitorConfig

View File

@ -186,6 +186,16 @@ meta_monitor_is_primary (MetaMonitor *monitor)
return output->is_primary;
}
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)
{

View File

@ -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);