This is an automated email from the git hooks/post-receive script.

bluesabre pushed a 
commit to branch 
xfce-4.12
in repository xfce/xfce4-settings.

commit 8e6f47ba40e7e5186a86851df078923285c60c90
Author: Simon Steinbeiss <simon.steinbe...@elfenbeinturm.at>
Date:   Fri Mar 2 16:22:11 2018 +0100

    display: Visually note if two displays overlap (mirrored) but are not cloned
---
 dialogs/display-settings/main.c | 10 +++++++++-
 1 file changed, 9 insertions(+), 1 deletion(-)

diff --git a/dialogs/display-settings/main.c b/dialogs/display-settings/main.c
index 199e291..6fdd015 100644
--- a/dialogs/display-settings/main.c
+++ b/dialogs/display-settings/main.c
@@ -933,6 +933,7 @@ display_setting_mirror_displays_populate (GtkBuilder 
*builder)
     RRMode   mode = None;
     guint    n;
     gint     cloned = TRUE;
+    gint     mirrored;
 
     if (!xfce_randr)
         return;
@@ -970,12 +971,19 @@ display_setting_mirror_displays_populate (GtkBuilder 
*builder)
 
         cloned &= (xfce_randr->mode[n] == mode &&
                    xfce_randr->mirrored[n]);
+        mirrored = xfce_randr->mirrored[n];
 
         if (!cloned)
             break;
     }
 
-    gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (check), cloned);
+    /* if two displays are 'mirrored', i.e. their x and y positions are the 
same
+       we set the checkbutton to the inconsistent state */
+    if (mirrored == TRUE && cloned == FALSE)
+        gtk_toggle_button_set_inconsistent (GTK_TOGGLE_BUTTON (check), 1);
+    else
+        gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (check), cloned);
+
 
     /* Unblock the signal */
     g_signal_handlers_unblock_by_func (check, 
display_setting_mirror_displays_toggled,

-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.
_______________________________________________
Xfce4-commits mailing list
Xfce4-commits@xfce.org
https://mail.xfce.org/mailman/listinfo/xfce4-commits

Reply via email to