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;
}
/**
* 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
meta_window_update_monitor (MetaWindow *window)
{