Add API to get the monitor of a window

https://bugzilla.gnome.org/show_bug.cgi?id=609258
This commit is contained in:
Alexander Larsson 2011-02-28 15:21:35 +01:00
parent 44cfceba00
commit d6f0d2c64c
2 changed files with 15 additions and 0 deletions

View File

@ -3995,6 +3995,20 @@ move_attached_dialog (MetaWindow *window,
return FALSE; return FALSE;
} }
/**
* meta_window_get_monitor:
* @window: a #MetaWindow
*
* Gets index of the monitor that this window is on.
*
* Return Value: The index of the monitor in the screens monitor list
*/
int
meta_window_get_monitor (MetaWindow *window)
{
return window->monitor->number;
}
void void
meta_window_update_monitor (MetaWindow *window) meta_window_update_monitor (MetaWindow *window)
{ {

View File

@ -81,6 +81,7 @@ Window meta_window_get_xwindow (MetaWindow *window);
MetaWindowType meta_window_get_window_type (MetaWindow *window); MetaWindowType meta_window_get_window_type (MetaWindow *window);
Atom meta_window_get_window_type_atom (MetaWindow *window); Atom meta_window_get_window_type_atom (MetaWindow *window);
MetaWorkspace *meta_window_get_workspace (MetaWindow *window); MetaWorkspace *meta_window_get_workspace (MetaWindow *window);
int meta_window_get_monitor (MetaWindow *window);
gboolean meta_window_is_on_all_workspaces (MetaWindow *window); gboolean meta_window_is_on_all_workspaces (MetaWindow *window);
gboolean meta_window_is_hidden (MetaWindow *window); gboolean meta_window_is_hidden (MetaWindow *window);
void meta_window_activate (MetaWindow *window,guint32 current_time); void meta_window_activate (MetaWindow *window,guint32 current_time);