mirror of
https://github.com/brl/mutter.git
synced 2024-11-29 03:20:46 -05: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
093e101252
commit
32b7743735
@ -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