Add API for getting work area given a logical monitor

To complement the current API which takes an index referencing a
logical monitor in the logical monitor array, add API that takes a
direct reference to the logical monitor itself. The intention is to
replace the usage of the index based API with one that doesn't rely on
internal implementation details.

https://bugzilla.gnome.org/show_bug.cgi?id=777732
This commit is contained in:
Jonas Ådahl
2016-11-29 11:48:52 +08:00
parent e659b07c39
commit 79fd91ec35
4 changed files with 37 additions and 20 deletions

View File

@ -1006,6 +1006,16 @@ meta_workspace_set_builtin_struts (MetaWorkspace *workspace,
meta_workspace_invalidate_work_area (workspace);
}
void
meta_workspace_get_work_area_for_logical_monitor (MetaWorkspace *workspace,
MetaLogicalMonitor *logical_monitor,
MetaRectangle *area)
{
meta_workspace_get_work_area_for_monitor (workspace,
logical_monitor->number,
area);
}
/**
* meta_workspace_get_work_area_for_monitor:
* @workspace: a #MetaWorkspace