diff --git a/src/core/window.c b/src/core/window.c index 3b175607d..d721972bb 100644 --- a/src/core/window.c +++ b/src/core/window.c @@ -8665,3 +8665,12 @@ meta_window_set_compositor_private (MetaWindow *window, void *priv) window->compositor_private = priv; } +const char * +meta_window_get_role (MetaWindow *window) +{ + if (!window) + return NULL; + + return window->role; +} + diff --git a/src/include/window.h b/src/include/window.h index e43973cac..b99816dca 100644 --- a/src/include/window.h +++ b/src/include/window.h @@ -95,4 +95,6 @@ void meta_window_change_workspace_by_index (MetaWindow *window, void *meta_window_get_compositor_private (MetaWindow *window); void meta_window_set_compositor_private (MetaWindow *window, void *priv); void meta_window_configure_notify (MetaWindow *window, XConfigureEvent *event); +const char *meta_window_get_role (MetaWindow *window); + #endif