From dfb0e4f57b9941352d3ca67c42f1f97cd073312c Mon Sep 17 00:00:00 2001 From: Davyd Madeley Date: Wed, 10 Jun 2009 11:02:14 +0800 Subject: [PATCH] Add meta_window_get_title() method Update meta_window_get_title() as per comments --- src/core/window.c | 14 ++++++++++++++ src/include/window.h | 1 + 2 files changed, 15 insertions(+) diff --git a/src/core/window.c b/src/core/window.c index 363bcc9da..9c835469f 100644 --- a/src/core/window.c +++ b/src/core/window.c @@ -8735,6 +8735,20 @@ meta_window_get_role (MetaWindow *window) return window->role; } +/** + * meta_window_get_title: + * @window: a #MetaWindow + * + * Returns the current title of the window. + */ +const char * +meta_window_get_title (MetaWindow *window) +{ + g_return_val_if_fail (META_IS_WINDOW (window), NULL); + + return window->title; +} + MetaStackLayer meta_window_get_layer (MetaWindow *window) { diff --git a/src/include/window.h b/src/include/window.h index 115a17e2d..372fea21a 100644 --- a/src/include/window.h +++ b/src/include/window.h @@ -108,5 +108,6 @@ void meta_window_unmaximize (MetaWindow *window, MetaMaximizeFlags directions); void meta_window_minimize (MetaWindow *window); void meta_window_unminimize (MetaWindow *window); +const char *meta_window_get_title (MetaWindow *window); #endif