summaryrefslogtreecommitdiff
path: root/panels
diff options
context:
space:
mode:
authorRui Matos <tiagomatos@gmail.com>2015-02-19 18:06:27 +0100
committerRui Matos <tiagomatos@gmail.com>2015-03-19 19:36:58 +0100
commit69089a09196cd6c9d37763579e80de2e88cd957c (patch)
treebdc07606aa557d97d196539b1e88d00ba1739242 /panels
parent27090d7c296d05540aaab34de92ce489ab4391c0 (diff)
downloadgnome-control-center-69089a09196cd6c9d37763579e80de2e88cd957c.tar.gz
display: In clone mode, set geometry of all outputs when one changes
Otherwise we could fail to validate the new configuration depending on which output we're initializing mirror mode from. gnome_rr_config_applicable() creates a temporary array of outputs for validation and, in clone mode, all of them are assigned the same geometry but, since it lacks context about which output the user is currently on, it just uses the first one's geometry for all of them. If this first output isn't the one the user is changing in the UI then we never called _set_geometry() on it with a clone mode geometry and thus the validation would fail because the geometry used is that output's current mode which might not match the clone mode's. https://bugzilla.gnome.org/show_bug.cgi?id=743816
Diffstat (limited to 'panels')
-rw-r--r--panels/display/cc-display-panel.c15
1 files changed, 13 insertions, 2 deletions
diff --git a/panels/display/cc-display-panel.c b/panels/display/cc-display-panel.c
index ee127930f..63b3c399f 100644
--- a/panels/display/cc-display-panel.c
+++ b/panels/display/cc-display-panel.c
@@ -1904,7 +1904,8 @@ res_combo_changed (GtkComboBox *combo,
GtkTreeModel *res_model;
GtkTreeIter iter;
GnomeRRMode *mode;
- gint x, y, width, height;
+ gint x, y, width, height, i;
+ GnomeRROutputInfo **outputs;
res_model = gtk_combo_box_get_model (combo);
@@ -1917,7 +1918,17 @@ res_combo_changed (GtkComboBox *combo,
width = gnome_rr_mode_get_width (mode);
height = gnome_rr_mode_get_height (mode);
- gnome_rr_output_info_set_geometry (priv->current_output, x, y, width, height);
+ if (gnome_rr_config_get_clone (priv->current_configuration))
+ {
+ outputs = gnome_rr_config_get_outputs (priv->current_configuration);
+ for (i = 0; outputs[i]; i++)
+ gnome_rr_output_info_set_geometry (outputs[i], x, y, width, height);
+ }
+ else
+ {
+ gnome_rr_output_info_set_geometry (priv->current_output, x, y, width, height);
+ }
+
update_apply_button (panel);
}
}