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