workspace: Don't keep state given logical monitor indices

Don't store logical monitor specific state in an array where the index
from the monitor manager is used as index locally. Instead just use
table associating a logical monitor with a monitor specific state
holder, and store the state in there. This way we don't have the
workspace implementation relying on implementation details of other
units.

https://bugzilla.gnome.org/show_bug.cgi?id=777732
This commit is contained in:
Jonas Ådahl
2016-12-02 17:39:01 +08:00
parent 6de3e4a07e
commit 68f3b5849a
3 changed files with 96 additions and 65 deletions

View File

@ -54,12 +54,10 @@ struct _MetaWorkspace
GList *list_containing_self;
GHashTable *logical_monitor_data;
MetaRectangle work_area_screen;
MetaRectangle *work_area_monitor;
gint n_work_area_monitor;
GList *screen_region;
GList **monitor_region;
gint n_monitor_regions;
GList *screen_edges;
GList *monitor_edges;
GSList *builtin_struts;
@ -90,8 +88,8 @@ void meta_workspace_get_work_area_for_logical_monitor (MetaWorkspace *works
void meta_workspace_invalidate_work_area (MetaWorkspace *workspace);
GList* meta_workspace_get_onscreen_region (MetaWorkspace *workspace);
GList* meta_workspace_get_onmonitor_region (MetaWorkspace *workspace,
int which_monitor);
GList * meta_workspace_get_onmonitor_region (MetaWorkspace *workspace,
MetaLogicalMonitor *logical_monitor);
void meta_workspace_focus_default_window (MetaWorkspace *workspace,
MetaWindow *not_this_one,