Subject; [PATCH] xrandr; explicitly set clone state variable when generating
 monitor configs

Each potential monitor configuration that can be cycled through with
fn-f7 on laptops is generated by copying and tweaking the current
monitor configuration.

One necessary, but neglected tweak, was the current "clone" state.  This
means the clone state of the current configuration leaks into every
other config. Users who start in a cloned mode can never leave a clone
with the hotkey.

This commit explicitly sets the clone state appropriately.

Patch based on valuable, and detailed feedback provided by Marico Xu.

https;//bugzilla.gnome.org/show_bug.cgi?id=677472
---
 plugins/xrandr/gsd-xrandr-manager.c |    8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/plugins/xrandr/gsd-xrandr-manager.c b/plugins/xrandr/gsd-xrandr-manager.c
index 3da2b7f..62a3456 100644
--- a/plugins/xrandr/gsd-xrandr-manager.c
+++ b/plugins/xrandr/gsd-xrandr-manager.c
@@ -912,6 +912,8 @@ make_clone_setup (GsdXrandrManager *manager, GnomeRRScreen *screen)
                 result = NULL;
         }
 
+        gnome_rr_config_set_clone (result, TRUE);
+
         print_configuration (result, "clone setup");
 
         return result;
@@ -1013,6 +1015,8 @@ make_laptop_setup (GsdXrandrManager *manager, GnomeRRScreen *screen)
                 result = NULL;
         }
 
+        gnome_rr_config_set_clone (result, FALSE);
+
         print_configuration (result, "Laptop setup");
 
         /* FIXME - Maybe we should return NULL if there is more than
@@ -1153,6 +1157,8 @@ make_xinerama_setup (GsdXrandrManager *manager, GnomeRRScreen *screen)
                 result = NULL;
         }
 
+        gnome_rr_config_set_clone (result, FALSE);
+
         print_configuration (result, "xinerama setup");
 
         return result;
@@ -1186,6 +1192,8 @@ make_other_setup (GnomeRRScreen *screen)
                 result = NULL;
         }
 
+        gnome_rr_config_set_clone (result, FALSE);
+
         print_configuration (result, "other setup");
 
         return result;
-- 
1.7.10
