|
|
776610 |
From bc7d794d3a605342f384e2ff13ab241a5eb2f468 Mon Sep 17 00:00:00 2001
|
|
|
776610 |
From: Olivier Fourdan <ofourdan@redhat.com>
|
|
|
776610 |
Date: Wed, 12 Dec 2018 13:05:21 +0100
|
|
|
776610 |
Subject: [PATCH 11/12] window: Expose the client type in the API
|
|
|
776610 |
|
|
|
776610 |
We already have the enum exposed, but no accessor function.
|
|
|
776610 |
|
|
|
776610 |
Add `meta_window_get_client_type()` which returns the
|
|
|
776610 |
`MetaWindowClientType` of a window.
|
|
|
776610 |
|
|
|
776610 |
https://gitlab.gnome.org/GNOME/mutter/merge_requests/306
|
|
|
776610 |
(cherry picked from commit 7a5e0c78244b31052edfe3ea4ce1a1f48c94f93f)
|
|
|
776610 |
---
|
|
|
776610 |
src/core/window.c | 14 ++++++++++++++
|
|
|
776610 |
src/meta/window.h | 2 ++
|
|
|
776610 |
2 files changed, 16 insertions(+)
|
|
|
776610 |
|
|
|
776610 |
diff --git a/src/core/window.c b/src/core/window.c
|
|
|
776610 |
index 00b2e4d..4dd8bd6 100644
|
|
|
776610 |
--- a/src/core/window.c
|
|
|
776610 |
+++ b/src/core/window.c
|
|
|
776610 |
@@ -8482,3 +8482,17 @@ meta_window_get_id (MetaWindow *window)
|
|
|
776610 |
{
|
|
|
776610 |
return window->id;
|
|
|
776610 |
}
|
|
|
776610 |
+
|
|
|
776610 |
+/**
|
|
|
776610 |
+ * meta_window_get_client_type:
|
|
|
776610 |
+ * @window: a #MetaWindow
|
|
|
776610 |
+ *
|
|
|
776610 |
+ * Returns the #MetaWindowClientType of the window.
|
|
|
776610 |
+ *
|
|
|
776610 |
+ * Returns: (transfer none): The root ancestor window
|
|
|
776610 |
+ */
|
|
|
776610 |
+MetaWindowClientType
|
|
|
776610 |
+meta_window_get_client_type (MetaWindow *window)
|
|
|
776610 |
+{
|
|
|
776610 |
+ return window->client_type;
|
|
|
776610 |
+}
|
|
|
776610 |
diff --git a/src/meta/window.h b/src/meta/window.h
|
|
|
776610 |
index 364d541..8a56afc 100644
|
|
|
776610 |
--- a/src/meta/window.h
|
|
|
776610 |
+++ b/src/meta/window.h
|
|
|
776610 |
@@ -262,4 +262,6 @@ void meta_window_shove_titlebar_onscreen (MetaWindow *window);
|
|
|
776610 |
|
|
|
776610 |
uint64_t meta_window_get_id (MetaWindow *window);
|
|
|
776610 |
|
|
|
776610 |
+MetaWindowClientType meta_window_get_client_type (MetaWindow *window);
|
|
|
776610 |
+
|
|
|
776610 |
#endif
|
|
|
776610 |
--
|
|
|
776610 |
2.19.2
|
|
|
776610 |
|