From 50b9042ac29886721a30772363867b694abbf77c Mon Sep 17 00:00:00 2001 From: "Jasper St. Pierre" Date: Fri, 26 Apr 2013 11:33:11 -0400 Subject: [PATCH] window: Add an accessor for whether the window can close The shell will use this to determine whether to show a close button in the overview. https://bugzilla.gnome.org/show_bug.cgi?id=699269 --- src/core/window.c | 6 ++++++ src/meta/window.h | 2 ++ 2 files changed, 8 insertions(+) diff --git a/src/core/window.c b/src/core/window.c index d16b6fa38..1c9b2912e 100644 --- a/src/core/window.c +++ b/src/core/window.c @@ -11218,3 +11218,9 @@ meta_window_compute_tile_match (MetaWindow *window) window->tile_match = match; } } + +gboolean +meta_window_can_close (MetaWindow *window) +{ + return window->has_close_func; +} diff --git a/src/meta/window.h b/src/meta/window.h index 07ca88b0c..9679454ad 100644 --- a/src/meta/window.h +++ b/src/meta/window.h @@ -237,4 +237,6 @@ void meta_window_begin_grab_op (MetaWindow *window, gboolean frame_action, guint32 timestamp); +gboolean meta_window_can_close (MetaWindow *window); + #endif