Add api to get the primary monitor of the screen

We don't actually use the full xrandr to get the primary monitor, we
just rely on the xrandr xinerama compat code to return the primary
monitor first. This lets us avoid adding unnecessary xrandr code and
avoids issues with _NET_WM_FULLSCREEN_MONITORS monitor indexes being
defined wrt xinerama monitor index order.

https://bugzilla.gnome.org/show_bug.cgi?id=609258
This commit is contained in:
Alexander Larsson
2011-02-25 14:07:48 +01:00
parent de8eb1f8ee
commit f9b5cdfeb1
3 changed files with 30 additions and 0 deletions

View File

@@ -99,6 +99,7 @@ struct _MetaScreen
guint32 wm_sn_timestamp;
MetaMonitorInfo *monitor_infos;
int primary_monitor_index;
int n_monitor_infos;
/* Cache the current monitor */