[mutter] [MutterWindow] Added meta_window_get_transient_for_as_xid()



commit 948e54772d00f1dc06ba604a2c76847ac55559e0
Author: Tomas Frydrych <tf linux intel com>
Date:   Wed Oct 7 11:56:49 2009 +0100

    [MutterWindow] Added meta_window_get_transient_for_as_xid()
    
    Accessor for the transient xid hint.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=597010

 src/core/window.c    |   19 +++++++++++++++++++
 src/include/window.h |    1 +
 2 files changed, 20 insertions(+), 0 deletions(-)
---
diff --git a/src/core/window.c b/src/core/window.c
index 2e4c109..35730ea 100644
--- a/src/core/window.c
+++ b/src/core/window.c
@@ -8861,6 +8861,25 @@ meta_window_get_transient_for (MetaWindow *window)
 }
 
 /**
+ * meta_window_get_transient_for_as_xid:
+ * @window: a #MetaWindow
+ *
+ * Returns the XID of the window that is pointed to by the
+ * WM_TRANSIENT_FOR hint on this window (see XGetTransientForHint()
+ * or XSetTransientForHint()). Metacity keeps transient windows above their
+ * parents. A typical usage of this hint is for a dialog that wants to stay
+ * above its associated window.
+ *
+ * Return value: (transfer none): the window this window is transient for, or
+ * None if the WM_TRANSIENT_FOR hint is unset.
+ */
+Window
+meta_window_get_transient_for_as_xid (MetaWindow *window)
+{
+  return window->xtransient_for;
+}
+
+/**
  * meta_window_get_pid:
  * @window: a #MetaWindow
  *
diff --git a/src/include/window.h b/src/include/window.h
index 15f4f25..c2c21f6 100644
--- a/src/include/window.h
+++ b/src/include/window.h
@@ -116,6 +116,7 @@ void        meta_window_minimize           (MetaWindow  *window);
 void        meta_window_unminimize         (MetaWindow  *window);
 const char *meta_window_get_title (MetaWindow *window);
 MetaWindow *meta_window_get_transient_for (MetaWindow *window);
+Window      meta_window_get_transient_for_as_xid (MetaWindow *window);
 void        meta_window_delete             (MetaWindow  *window,
                                             guint32      timestamp);
 guint       meta_window_get_stable_sequence (MetaWindow *window);



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]