diff --git a/src/core/window-private.h b/src/core/window-private.h index f143bc490..cb003f98f 100644 --- a/src/core/window-private.h +++ b/src/core/window-private.h @@ -574,8 +574,6 @@ void meta_window_free_delete_dialog (MetaWindow *window); void meta_window_foreach_transient (MetaWindow *window, MetaWindowForeachFunc func, void *data); -gboolean meta_window_is_ancestor_of_transient (MetaWindow *window, - MetaWindow *transient); void meta_window_foreach_ancestor (MetaWindow *window, MetaWindowForeachFunc func, void *data); diff --git a/src/core/window.c b/src/core/window.c index fba52404e..4e7d5e001 100644 --- a/src/core/window.c +++ b/src/core/window.c @@ -8114,6 +8114,17 @@ find_ancestor_func (MetaWindow *window, return TRUE; } +/** + * meta_window_is_ancestor_of_transient: + * @window: a #MetaWindow + * @transient: a #MetaWindow + * + * The function determines whether @window is an ancestor of @transient; it does + * so by traversing the @transient's ancestors until it either locates @window + * or reaches an ancestor that is not transient. + * + * Return Value: (transfer none): %TRUE if window is an ancestor of transient. + */ gboolean meta_window_is_ancestor_of_transient (MetaWindow *window, MetaWindow *transient) diff --git a/src/include/window.h b/src/include/window.h index d26c9723f..f611da8f2 100644 --- a/src/include/window.h +++ b/src/include/window.h @@ -100,6 +100,8 @@ void meta_window_configure_notify (MetaWindow *window, XConfigureEvent *event); const char *meta_window_get_role (MetaWindow *window); MetaStackLayer meta_window_get_layer (MetaWindow *window); MetaWindow* meta_window_find_root_ancestor (MetaWindow *window); +gboolean meta_window_is_ancestor_of_transient (MetaWindow *window, + MetaWindow *transient); gboolean meta_window_get_icon_geometry (MetaWindow *window, MetaRectangle *rect); void meta_window_maximize (MetaWindow *window,