mirror of
https://github.com/brl/mutter.git
synced 2024-11-25 17:40:40 -05:00
Make meta_workspace_get_neighbor() public
There is no need for this function to be private, and it can greatly simplify gnome-shell code handling workspace switch. https://bugzilla.gnome.org/show_bug.cgi?id=674104
This commit is contained in:
parent
dc232b6cad
commit
e31f55e146
@ -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
|
||||
|
@ -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)
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user