From 2222cb8fbfeebf4ce6483bc5b45d9faf4b52e61e Mon Sep 17 00:00:00 2001 From: Tomas Frydrych Date: Tue, 4 Aug 2009 08:32:36 +0100 Subject: [PATCH] Added public prototype for meta_window_is_ancestor_of_transient() http://bugzilla.gnome.org/show_bug.cgi?id=590439 --- src/core/window-private.h | 2 -- src/core/window.c | 11 +++++++++++ src/include/window.h | 2 ++ 3 files changed, 13 insertions(+), 2 deletions(-) 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,