When monitors change, keep windows on same output.

If XRANDR is availible, we track the first (or primary) output per
crtc (== xinerama monitor) so when the monitors change we can try
to find the same output and move windows there. If we can't find the
original monitor in the new set (or XRANDR is not supported) we move
the window to the primary monitor.

https://bugzilla.gnome.org/show_bug.cgi?id=645408
This commit is contained in:
Alexander Larsson
2011-05-20 10:56:12 +02:00
committed by Florian Müllner
parent 9520eaa970
commit 19b6888ea5
4 changed files with 168 additions and 48 deletions

View File

@@ -45,6 +45,8 @@ struct _MetaMonitorInfo
{
int number;
MetaRectangle rect;
gboolean is_primary;
XID output; /* The primary or first output for this crtc, None if no xrandr */
};
typedef void (* MetaScreenWindowFunc) (MetaScreen *screen, MetaWindow *window,