screen: Add a convenience method to focus the default window

This will be used for gnome-shell so that it can focus a window after
a keyboard grab or other things.

https://bugzilla.gnome.org/show_bug.cgi?id=689652
This commit is contained in:
Jasper St. Pierre 2012-12-04 14:30:55 -05:00
parent c0958090b4
commit 8830814d70
2 changed files with 11 additions and 0 deletions

View File

@ -3536,6 +3536,15 @@ meta_screen_get_active_workspace (MetaScreen *screen)
return screen->active_workspace; return screen->active_workspace;
} }
void
meta_screen_focus_default_window (MetaScreen *screen,
guint32 timestamp)
{
meta_workspace_focus_default_window (screen->active_workspace,
NULL,
timestamp);
}
void void
meta_screen_restacked (MetaScreen *screen) meta_screen_restacked (MetaScreen *screen)
{ {

View File

@ -81,6 +81,8 @@ int meta_screen_get_current_monitor (MetaScreen *screen);
void meta_screen_get_monitor_geometry (MetaScreen *screen, void meta_screen_get_monitor_geometry (MetaScreen *screen,
int monitor, int monitor,
MetaRectangle *geometry); MetaRectangle *geometry);
void meta_screen_focus_default_window (MetaScreen *screen,
guint32 timestamp);
typedef enum typedef enum
{ {