[gnome-control-center/wip/rtcm/new-display-config: 7/9] display: Don't do automatic layout adjustments with the new API



commit ce2e89df85854c5f2b1d3d6b1fe69bb2deeb97fb
Author: Rui Matos <tiagomatos gmail com>
Date:   Fri Apr 7 18:51:26 2017 +0200

    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.

 panels/display/cc-display-panel.c |   25 ++++++++++++++++---------
 1 files changed, 16 insertions(+), 9 deletions(-)
---
diff --git a/panels/display/cc-display-panel.c b/panels/display/cc-display-panel.c
index 2d91646..2d8434b 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);
-
-          if (!clone)
-            realign_outputs_after_resolution_change (panel,
-                                                     priv->current_output,
-                                                     old_width, old_height, rotation);
+          /* 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);
+            }
         }
       else
         {


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]