[mutter/wip/texture-purge-on-nvidia: 59/66] window: Expose the client type in the API



commit 051ebae725ee0dfc0be9da36ee16db6697478931
Author: Olivier Fourdan <ofourdan redhat com>
Date:   Wed Dec 12 13:05:21 2018 +0100

    window: Expose the client type in the API
    
    We already have the enum exposed, but no accessor function.
    
    Add `meta_window_get_client_type()` which returns the
    `MetaWindowClientType` of a window.
    
    https://gitlab.gnome.org/GNOME/mutter/merge_requests/306
    (cherry picked from commit 7a5e0c78244b31052edfe3ea4ce1a1f48c94f93f)

 src/core/window.c | 14 ++++++++++++++
 src/meta/window.h |  2 ++
 2 files changed, 16 insertions(+)
---
diff --git a/src/core/window.c b/src/core/window.c
index 00b2e4d67..4dd8bd649 100644
--- a/src/core/window.c
+++ b/src/core/window.c
@@ -8482,3 +8482,17 @@ meta_window_get_id (MetaWindow *window)
 {
   return window->id;
 }
+
+/**
+ * meta_window_get_client_type:
+ * @window: a #MetaWindow
+ *
+ * Returns the #MetaWindowClientType of the window.
+ *
+ * Returns: (transfer none): The root ancestor window
+ */
+MetaWindowClientType
+meta_window_get_client_type (MetaWindow *window)
+{
+  return window->client_type;
+}
diff --git a/src/meta/window.h b/src/meta/window.h
index 364d54115..8a56afcad 100644
--- a/src/meta/window.h
+++ b/src/meta/window.h
@@ -262,4 +262,6 @@ void     meta_window_shove_titlebar_onscreen (MetaWindow *window);
 
 uint64_t meta_window_get_id (MetaWindow *window);
 
+MetaWindowClientType meta_window_get_client_type (MetaWindow *window);
+
 #endif


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