monitor-manager: Add API to find primary monitor

https://bugzilla.gnome.org/show_bug.cgi?id=777732
This commit is contained in:
Jonas Ådahl 2016-12-21 12:38:13 +08:00
parent 0c42faf34d
commit aaddf44d45
2 changed files with 8 additions and 0 deletions

View File

@ -353,6 +353,8 @@ MetaLogicalMonitor *meta_monitor_manager_get_logical_monitor_neighbor (MetaMonit
MetaLogicalMonitor *logical_monitor, MetaLogicalMonitor *logical_monitor,
MetaScreenDirection direction); MetaScreenDirection direction);
MetaMonitor * meta_monitor_manager_get_primary_monitor (MetaMonitorManager *manager);
MetaMonitor * meta_monitor_manager_get_laptop_panel (MetaMonitorManager *manager); MetaMonitor * meta_monitor_manager_get_laptop_panel (MetaMonitorManager *manager);
GList * meta_monitor_manager_get_monitors (MetaMonitorManager *manager); GList * meta_monitor_manager_get_monitors (MetaMonitorManager *manager);

View File

@ -1252,6 +1252,12 @@ find_monitor (MetaMonitorManager *monitor_manager,
return NULL; return NULL;
} }
MetaMonitor *
meta_monitor_manager_get_primary_monitor (MetaMonitorManager *manager)
{
return find_monitor (manager, meta_monitor_is_primary);
}
MetaMonitor * MetaMonitor *
meta_monitor_manager_get_laptop_panel (MetaMonitorManager *manager) meta_monitor_manager_get_laptop_panel (MetaMonitorManager *manager)
{ {