mirror of
https://github.com/brl/mutter.git
synced 2024-11-26 10:00:45 -05:00
MetaMonitorManager: Add API turning monitor index into logical monitor
This is the current equivalent of looking up the logical monitor in the logical monitor array using the number, but eventually that will be deprecated, and before that done differently, so add a temporary helper for the places that has not been ported yet. https://bugzilla.gnome.org/show_bug.cgi?id=777732
This commit is contained in:
parent
441b854d41
commit
e659b07c39
@ -368,6 +368,9 @@ int meta_monitor_manager_get_num_logical_monitors (MetaMonitorMa
|
||||
MetaLogicalMonitor *meta_monitor_manager_get_logical_monitors (MetaMonitorManager *manager,
|
||||
unsigned int *n_logical_monitors);
|
||||
|
||||
MetaLogicalMonitor *meta_monitor_manager_get_logical_monitor_from_number (MetaMonitorManager *manager,
|
||||
int number);
|
||||
|
||||
MetaLogicalMonitor *meta_monitor_manager_get_primary_logical_monitor (MetaMonitorManager *manager);
|
||||
|
||||
MetaOutput *meta_monitor_manager_get_outputs (MetaMonitorManager *manager,
|
||||
|
@ -1314,6 +1314,15 @@ meta_monitor_manager_get_logical_monitors (MetaMonitorManager *manager,
|
||||
return manager->logical_monitors;
|
||||
}
|
||||
|
||||
MetaLogicalMonitor *
|
||||
meta_monitor_manager_get_logical_monitor_from_number (MetaMonitorManager *manager,
|
||||
int number)
|
||||
{
|
||||
g_assert (number < (int) manager->n_logical_monitors);
|
||||
|
||||
return &manager->logical_monitors[number];
|
||||
}
|
||||
|
||||
MetaLogicalMonitor *
|
||||
meta_monitor_manager_get_primary_logical_monitor (MetaMonitorManager *manager)
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user