mirror of
https://github.com/brl/mutter.git
synced 2024-12-23 19:42:05 +00:00
Remove meta_monitor_manager_get_monitor_for_output() API
This function is replaced by an equivalent that takes a connector string. https://bugzilla.gnome.org/show_bug.cgi?id=785381
This commit is contained in:
parent
315a6f43d7
commit
18ec86bd90
@ -2813,40 +2813,6 @@ meta_monitor_manager_get_monitor_matrix (MetaMonitorManager *manager,
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
/**
|
||||
* meta_monitor_manager_get_monitor_for_output:
|
||||
* @manager: A #MetaMonitorManager
|
||||
* @id: A valid #MetaOutput id
|
||||
*
|
||||
* Returns: The monitor index or -1 if @id isn't valid or the output
|
||||
* isn't associated with a logical monitor.
|
||||
*/
|
||||
gint
|
||||
meta_monitor_manager_get_monitor_for_output (MetaMonitorManager *manager,
|
||||
guint id)
|
||||
{
|
||||
MetaOutput *output;
|
||||
GList *l;
|
||||
|
||||
g_return_val_if_fail (META_IS_MONITOR_MANAGER (manager), -1);
|
||||
g_return_val_if_fail (id < g_list_length (manager->outputs), -1);
|
||||
|
||||
output = g_list_nth_data (manager->outputs, id);
|
||||
if (!output || !output->crtc)
|
||||
return -1;
|
||||
|
||||
for (l = manager->logical_monitors; l; l = l->next)
|
||||
{
|
||||
MetaLogicalMonitor *logical_monitor = l->data;
|
||||
|
||||
if (meta_rectangle_contains_rect (&logical_monitor->rect,
|
||||
&output->crtc->rect))
|
||||
return logical_monitor->number;
|
||||
}
|
||||
|
||||
return -1;
|
||||
}
|
||||
|
||||
/**
|
||||
* meta_monitor_manager_get_monitor_for_connector:
|
||||
* @manager: A #MetaMonitorManager
|
||||
|
@ -40,9 +40,6 @@ GType meta_monitor_manager_get_type (void);
|
||||
|
||||
MetaMonitorManager *meta_monitor_manager_get (void);
|
||||
|
||||
gint meta_monitor_manager_get_monitor_for_output (MetaMonitorManager *manager,
|
||||
guint id);
|
||||
|
||||
gint meta_monitor_manager_get_monitor_for_connector (MetaMonitorManager *manager,
|
||||
const char *connector);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user