diff --git a/src/core/meta-workspace-manager.c b/src/core/meta-workspace-manager.c index 5896fd8c5..614fa96f3 100644 --- a/src/core/meta-workspace-manager.c +++ b/src/core/meta-workspace-manager.c @@ -75,10 +75,10 @@ meta_workspace_manager_get_property (GObject *object, switch (prop_id) { case PROP_LAYOUT_COLUMNS: - g_value_set_int (value, workspace_manager->columns_of_workspaces); + g_value_set_int (value, meta_workspace_manager_get_layout_columns (workspace_manager)); break; case PROP_LAYOUT_ROWS: - g_value_set_int (value, workspace_manager->rows_of_workspaces); + g_value_set_int (value, meta_workspace_manager_get_layout_rows (workspace_manager)); break; case PROP_N_WORKSPACES: g_value_set_int (value, meta_workspace_manager_get_n_workspaces (workspace_manager)); @@ -1047,3 +1047,19 @@ prefs_changed_callback (MetaPreference pref, timestamp, new_num); } } + +int +meta_workspace_manager_get_layout_columns (MetaWorkspaceManager *workspace_manager) +{ + g_return_val_if_fail (META_IS_WORKSPACE_MANAGER (workspace_manager), -1); + + return workspace_manager->columns_of_workspaces; +} + +int +meta_workspace_manager_get_layout_rows (MetaWorkspaceManager *workspace_manager) +{ + g_return_val_if_fail (META_IS_WORKSPACE_MANAGER (workspace_manager), -1); + + return workspace_manager->rows_of_workspaces; +} diff --git a/src/meta/meta-workspace-manager.h b/src/meta/meta-workspace-manager.h index d068fa1ac..777447dcc 100644 --- a/src/meta/meta-workspace-manager.h +++ b/src/meta/meta-workspace-manager.h @@ -74,3 +74,9 @@ void meta_workspace_manager_override_workspace_layout (MetaWorkspaceManager *wor gboolean vertical_layout, int n_rows, int n_columns); + +META_EXPORT +int meta_workspace_manager_get_layout_columns (MetaWorkspaceManager *workspace_manager); + +META_EXPORT +int meta_workspace_manager_get_layout_rows (MetaWorkspaceManager *workspace_manager);