mirror of
https://github.com/brl/mutter.git
synced 2025-06-29 00:13:04 +00:00
screen: Add public method to get neighboring monitor
The existing private get_monitor_neighbor() function returns a MetaMonitorInfo, which is private as well. Add a public wrapper that returns a monitor index instead, as we do for other public monitor-related methods. https://bugzilla.gnome.org/show_bug.cgi?id=633994
This commit is contained in:
@ -41,14 +41,6 @@
|
||||
typedef void (* MetaScreenWindowFunc) (MetaWindow *window,
|
||||
gpointer user_data);
|
||||
|
||||
typedef enum
|
||||
{
|
||||
META_SCREEN_UP,
|
||||
META_SCREEN_DOWN,
|
||||
META_SCREEN_LEFT,
|
||||
META_SCREEN_RIGHT
|
||||
} MetaScreenDirection;
|
||||
|
||||
#define META_WIREFRAME_XOR_LINE_WIDTH 2
|
||||
|
||||
struct _MetaScreen
|
||||
|
@ -1490,6 +1490,16 @@ meta_screen_get_monitor_neighbor (MetaScreen *screen,
|
||||
return NULL;
|
||||
}
|
||||
|
||||
int
|
||||
meta_screen_get_monitor_neighbor_index (MetaScreen *screen,
|
||||
int which_monitor,
|
||||
MetaScreenDirection direction)
|
||||
{
|
||||
const MetaMonitorInfo *monitor;
|
||||
monitor = meta_screen_get_monitor_neighbor (screen, which_monitor, direction);
|
||||
return monitor ? monitor->number : -1;
|
||||
}
|
||||
|
||||
void
|
||||
meta_screen_get_natural_monitor_list (MetaScreen *screen,
|
||||
int** monitors_list,
|
||||
|
Reference in New Issue
Block a user