mirror of
https://github.com/brl/mutter.git
synced 2024-12-23 19:42:05 +00:00
screen: Add an introspectible wrapper for find_monitor_for_rect
Instead of returning a MonitorInfo, it returns a monitor index. https://bugzilla.gnome.org/show_bug.cgi?id=692679
This commit is contained in:
parent
d8058138ab
commit
3900aa10f8
@ -2040,6 +2040,14 @@ meta_screen_get_monitor_for_window (MetaScreen *screen,
|
|||||||
return meta_screen_get_monitor_for_rect (screen, &window_rect);
|
return meta_screen_get_monitor_for_rect (screen, &window_rect);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
int
|
||||||
|
meta_screen_get_monitor_index_for_rect (MetaScreen *screen,
|
||||||
|
MetaRectangle *rect)
|
||||||
|
{
|
||||||
|
const MetaMonitorInfo *monitor = meta_screen_get_monitor_for_rect (screen, rect);
|
||||||
|
return monitor->number;
|
||||||
|
}
|
||||||
|
|
||||||
const MetaMonitorInfo*
|
const MetaMonitorInfo*
|
||||||
meta_screen_get_monitor_neighbor (MetaScreen *screen,
|
meta_screen_get_monitor_neighbor (MetaScreen *screen,
|
||||||
int which_monitor,
|
int which_monitor,
|
||||||
|
@ -81,6 +81,10 @@ 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);
|
||||||
|
|
||||||
|
int meta_screen_get_monitor_index_for_rect (MetaScreen *screen,
|
||||||
|
MetaRectangle *rect);
|
||||||
|
|
||||||
void meta_screen_focus_default_window (MetaScreen *screen,
|
void meta_screen_focus_default_window (MetaScreen *screen,
|
||||||
guint32 timestamp);
|
guint32 timestamp);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user