[Xfce4-commits] [xfce/xfce4-settings] 01/04: display: Visually note if two displays overlap (mirrored) but are not cloned

noreply at xfce.org noreply at xfce.org
Sun Mar 11 13:31:22 CET 2018


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

b   l   u   e   s   a   b   r   e       p   u   s   h   e   d       a       c   o   m   m   i   t       t   o       b   r   a   n   c   h       m   a   s   t   e   r   
   in repository xfce/xfce4-settings.

commit 3c724f142d116abd5348b7bcd9f534bad94c2e44
Author: Simon Steinbeiss <simon.steinbeiss at 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 624432b..0a16b53 100644
--- a/dialogs/display-settings/main.c
+++ b/dialogs/display-settings/main.c
@@ -941,6 +941,7 @@ display_setting_mirror_displays_populate (GtkBuilder *builder)
     RRMode   mode = None;
     guint    n;
     gint     cloned = TRUE;
+    gint     mirrored;
 
     if (!xfce_randr)
         return;
@@ -978,12 +979,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.


More information about the Xfce4-commits mailing list