meta_screen_get_active_workspace_index()

This commit is contained in:
Tomas Frydrych 2008-11-03 12:32:25 +00:00
parent 20ce1e77d9
commit 7ec7a8fa44
2 changed files with 12 additions and 0 deletions

View File

@ -2884,3 +2884,13 @@ meta_screen_get_workspaces (MetaScreen *screen)
return screen->workspaces;
}
int
meta_screen_get_active_workspace_index (MetaScreen *screen)
{
MetaWorkspace *active = screen->active_workspace;
if (!active)
return -1;
return meta_workspace_index (active);
}

View File

@ -57,4 +57,6 @@ MetaWorkspace *meta_screen_append_new_workspace (MetaScreen *screen,
gboolean activate,
guint32 timestamp);
int meta_screen_get_active_workspace_index (MetaScreen *screen);
#endif