mirror of
https://github.com/brl/mutter.git
synced 2024-11-25 09:30:45 -05:00
monitor-manager: Add helper for getting monitor from connector
This will be used later. https://bugzilla.gnome.org/show_bug.cgi?id=784199
This commit is contained in:
parent
34e7134db2
commit
3005a400ca
@ -449,6 +449,9 @@ MetaMonitor * meta_monitor_manager_get_laptop_panel (MetaMonitorManager *m
|
||||
MetaMonitor * meta_monitor_manager_get_monitor_from_spec (MetaMonitorManager *manager,
|
||||
MetaMonitorSpec *monitor_spec);
|
||||
|
||||
MetaMonitor * meta_monitor_manager_get_monitor_from_connector (MetaMonitorManager *manager,
|
||||
const char *connector);
|
||||
|
||||
GList * meta_monitor_manager_get_monitors (MetaMonitorManager *manager);
|
||||
|
||||
MetaOutput *meta_monitor_manager_get_outputs (MetaMonitorManager *manager,
|
||||
|
@ -2313,6 +2313,24 @@ meta_monitor_manager_get_laptop_panel (MetaMonitorManager *manager)
|
||||
return find_monitor (manager, meta_monitor_is_laptop_panel);
|
||||
}
|
||||
|
||||
MetaMonitor *
|
||||
meta_monitor_manager_get_monitor_from_connector (MetaMonitorManager *manager,
|
||||
const char *connector)
|
||||
{
|
||||
GList *l;
|
||||
|
||||
for (l = manager->monitors; l; l = l->next)
|
||||
{
|
||||
MetaMonitor *monitor = l->data;
|
||||
|
||||
if (g_str_equal (meta_monitor_get_connector (monitor),
|
||||
connector))
|
||||
return monitor;
|
||||
}
|
||||
|
||||
return NULL;
|
||||
}
|
||||
|
||||
MetaMonitor *
|
||||
meta_monitor_manager_get_monitor_from_spec (MetaMonitorManager *manager,
|
||||
MetaMonitorSpec *monitor_spec)
|
||||
|
Loading…
Reference in New Issue
Block a user