Add meta_window_get_wm_class

Public function to retrieve the cached WM_CLASS, used in gnome-shell
for tracking applications.
This commit is contained in:
Colin Walters 2009-05-29 13:26:18 -04:00
parent aff4cf1103
commit 2ed1bf05d1
2 changed files with 16 additions and 0 deletions

View File

@ -8687,6 +8687,21 @@ meta_window_get_description (MetaWindow *window)
return window->desc;
}
/**
* meta_window_get_wm_class:
* @window: a #MetaWindow
*
* Return the current value of the WM_CLASS X property.
*/
const char *
meta_window_get_wm_class (MetaWindow *window)
{
if (!window)
return NULL;
return window->res_class;
}
/**
* meta_window_get_compositor_private:
* @window: a #MetaWindow

View File

@ -85,6 +85,7 @@ void meta_window_activate_with_workspace (MetaWindow *window,
guint32 current_time,
MetaWorkspace *workspace);
const char * meta_window_get_description (MetaWindow *window);
const char * meta_window_get_wm_class (MetaWindow *window);
/* Return whether the window would be showing if we were on its workspace */
gboolean meta_window_showing_on_its_workspace (MetaWindow *window);