[gnome-settings-daemon] xrandr: explicitly set clone state variable when generating monitor configs
- From: Ray Strode <halfline src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-settings-daemon] xrandr: explicitly set clone state variable when generating monitor configs
- Date: Tue, 5 Jun 2012 14:35:58 +0000 (UTC)
commit 5f7643800a8bc26bd2835dc9a3df085bf0fab422
Author: Ray Strode <rstrode redhat com>
Date: Tue Jun 5 10:30:06 2012 -0400
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 files changed, 8 insertions(+), 0 deletions(-)
---
diff --git a/plugins/xrandr/gsd-xrandr-manager.c b/plugins/xrandr/gsd-xrandr-manager.c
index 3da2b7f..67372e4 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;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]