From 39c6db2772ef846d316bb8fb21712ae09bc991e7 Mon Sep 17 00:00:00 2001 From: Rui Matos Date: Fri, 7 Apr 2017 18:51:26 +0200 Subject: [PATCH] display: Don't do automatic layout adjustments with the new API The new API checks with mutter every time update_apply_button() is called and mutter is very strict about this so it already does these adjustments internally. https://bugzilla.gnome.org/show_bug.cgi?id=782785 --- panels/display/cc-display-panel.c | 23 +++++++++++++++-------- 1 file changed, 15 insertions(+), 8 deletions(-) diff --git a/panels/display/cc-display-panel.c b/panels/display/cc-display-panel.c index 2d9164662..2d8434b91 100644 --- a/panels/display/cc-display-panel.c +++ b/panels/display/cc-display-panel.c @@ -2398,15 +2398,22 @@ show_setup_dialog (CcDisplayPanel *panel) sanity_check_rotation (priv->current_output); - /* if the display was previously in clone mode, ensure the outputs - * are arranged correctly */ - if ((was_clone && !clone)) - lay_out_outputs_horizontally (panel); + /* The new API checks with mutter every time + update_apply_button() is called and mutter is very + strict about this so it already does these adjustments + internally. */ + if (!priv->have_new_dbus_api) + { + /* if the display was previously in clone mode, ensure the outputs + * are arranged correctly */ + if ((was_clone && !clone)) + lay_out_outputs_horizontally (panel); - if (!clone) - realign_outputs_after_resolution_change (panel, - priv->current_output, - old_width, old_height, rotation); + if (!clone) + realign_outputs_after_resolution_change (panel, + priv->current_output, + old_width, old_height, rotation); + } } else {