monitor-manager: Store logical monitors in a GList

Instead of storing the logical monitors in an array and having users
either look up them in the array given an index or iterate using
indices, put it in a GList, and use GList iterators when iterating and
alternative API where array indices were previously used.

This allows for more liberty regarding the type of the logical monitor.

https://bugzilla.gnome.org/show_bug.cgi?id=777732
This commit is contained in:
Jonas Ådahl
2016-12-02 16:00:03 +08:00
parent 20b8743f21
commit 1fb0e8e9bb
9 changed files with 175 additions and 162 deletions

View File

@ -56,6 +56,7 @@ struct _MetaWorkspace
MetaRectangle work_area_screen;
MetaRectangle *work_area_monitor;
gint n_work_area_monitor;
GList *screen_region;
GList **monitor_region;
gint n_monitor_regions;