MetaMonitor: Add _is_laptop_panel() helper
Add a helper to determine whether the monitor is the laptop panel or not. To be used by the configuration system. https://bugzilla.gnome.org/show_bug.cgi?id=777732
This commit is contained in:
parent
bc951557e8
commit
0177ab45af
@ -164,6 +164,24 @@ meta_monitor_is_primary (MetaMonitor *monitor)
|
||||
return output->is_primary;
|
||||
}
|
||||
|
||||
gboolean
|
||||
meta_monitor_is_laptop_panel (MetaMonitor *monitor)
|
||||
{
|
||||
MetaOutput *output;
|
||||
|
||||
output = meta_monitor_get_main_output (monitor);
|
||||
|
||||
switch (output->connector_type)
|
||||
{
|
||||
case META_CONNECTOR_TYPE_eDP:
|
||||
case META_CONNECTOR_TYPE_LVDS:
|
||||
case META_CONNECTOR_TYPE_DSI:
|
||||
return TRUE;
|
||||
default:
|
||||
return FALSE;
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
meta_monitor_get_dimensions (MetaMonitor *monitor,
|
||||
int *width,
|
||||
|
@ -92,6 +92,8 @@ MetaOutput * meta_monitor_get_main_output (MetaMonitor *monitor);
|
||||
|
||||
gboolean meta_monitor_is_primary (MetaMonitor *monitor);
|
||||
|
||||
gboolean meta_monitor_is_laptop_panel (MetaMonitor *monitor);
|
||||
|
||||
GList * meta_monitor_get_outputs (MetaMonitor *monitor);
|
||||
|
||||
void meta_monitor_get_dimensions (MetaMonitor *monitor,
|
||||
|
Loading…
Reference in New Issue
Block a user