summaryrefslogtreecommitdiff
path: root/src/core/window.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/core/window.c')
-rw-r--r--src/core/window.c18
1 files changed, 18 insertions, 0 deletions
diff --git a/src/core/window.c b/src/core/window.c
index 74994bd9..8e4345d2 100644
--- a/src/core/window.c
+++ b/src/core/window.c
@@ -8474,3 +8474,21 @@ meta_window_is_maximized (MetaWindow *window)
{
return META_WINDOW_MAXIMIZED (window);
}
+
+/**
+ * meta_window_is_client_decorated:
+ *
+ * Check if if the window has decorations drawn by the client.
+ * (window->decorated refers only to whether we should add decorations)
+ */
+gboolean
+meta_window_is_client_decorated (MetaWindow *window)
+{
+ /* Currently the implementation here is hackish -
+ * has_custom_frame_extents() is set if _GTK_FRAME_EXTENTS is set
+ * to any value even 0. GTK+ always sets _GTK_FRAME_EXTENTS for
+ * client-side-decorated window, even if the value is 0 because
+ * the window is maxized and has no invisible borders or shadows.
+ */
+ return window->has_custom_frame_extents;
+}