diff --git a/src/core/workspace-private.h b/src/core/workspace-private.h index 81bfe867a..78c900b04 100644 --- a/src/core/workspace-private.h +++ b/src/core/workspace-private.h @@ -98,9 +98,6 @@ void meta_workspace_focus_default_window (MetaWorkspace *workspace, MetaWindow *not_this_one, guint32 timestamp); -MetaWorkspace* meta_workspace_get_neighbor (MetaWorkspace *workspace, - MetaMotionDirection direction); - const char* meta_workspace_get_name (MetaWorkspace *workspace); #endif diff --git a/src/core/workspace.c b/src/core/workspace.c index 31c7a2417..b710dd566 100644 --- a/src/core/workspace.c +++ b/src/core/workspace.c @@ -1117,6 +1117,18 @@ meta_motion_direction_to_string (MetaMotionDirection direction) } #endif /* WITH_VERBOSE_MODE */ +/** + * meta_workspace_get_neighbor: + * @workspace: a #MetaWorkspace + * @direction: a #MetaMotionDirection, relative to @workspace + * + * Calculate and retrive the workspace that is next to @workspace, + * according to @direction and the current workspace layout, as set + * by meta_screen_override_workspace_layout(). + * + * Returns: (transfer none): the workspace next to @workspace, or + * @workspace itself if the neighbor would be outside the layout + */ MetaWorkspace* meta_workspace_get_neighbor (MetaWorkspace *workspace, MetaMotionDirection direction) diff --git a/src/meta/workspace.h b/src/meta/workspace.h index 33e1b6357..5dac43ed5 100644 --- a/src/meta/workspace.h +++ b/src/meta/workspace.h @@ -63,4 +63,7 @@ void meta_workspace_update_window_hints (MetaWorkspace *workspace); void meta_workspace_set_builtin_struts (MetaWorkspace *workspace, GSList *struts); +MetaWorkspace* meta_workspace_get_neighbor (MetaWorkspace *workspace, + MetaMotionDirection direction); + #endif