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

noreply at xfce.org noreply at xfce.org
Sun Mar 11 13:09:05 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       x   f   c   e   -   4   .   1   2   
   in repository xfce/xfce4-settings.

commit 8e6f47ba40e7e5186a86851df078923285c60c90
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 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.


More information about the Xfce4-commits mailing list