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
This commit is contained in:
parent
de821d5922
commit
511265e574
1 changed files with 13 additions and 2 deletions
|
@ -1945,7 +1945,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);
|
||||
|
||||
|
@ -1958,7 +1959,17 @@ res_combo_changed (GtkComboBox *combo,
|
|||
width = gnome_rr_mode_get_width (mode);
|
||||
height = gnome_rr_mode_get_height (mode);
|
||||
|
||||
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);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue