[Xfce4-commits] <xfce4-settings:bluesabre/display-settings> Fix inaccurate detection of active outputs

Simon Steinbeiss noreply at xfce.org
Thu Oct 18 23:38:07 CEST 2012


Updating branch refs/heads/bluesabre/display-settings
         to 987b583dfd887c8f5687e6bb92201e7c487ffbe2 (commit)
       from 9699639b790b19d543adbc977f973e5a19927894 (commit)

commit 987b583dfd887c8f5687e6bb92201e7c487ffbe2
Author: Lionel Le Folgoc <lionel at lefolgoc.net>
Date:   Wed Oct 17 22:12:45 2012 +0200

    Fix inaccurate detection of active outputs
    
    Signed-off-by: Simon Steinbeiss <simon.steinbeiss at elfenbeinturm.at>

 dialogs/display-settings/main.c |    9 ++++++---
 1 files changed, 6 insertions(+), 3 deletions(-)

diff --git a/dialogs/display-settings/main.c b/dialogs/display-settings/main.c
index 94a7f9e..bbfe3dd 100644
--- a/dialogs/display-settings/main.c
+++ b/dialogs/display-settings/main.c
@@ -1020,7 +1020,7 @@ display_setting_identity_display (gint display_id)
         display_name = gtk_builder_get_object (builder, "display_name");
         display_details = gtk_builder_get_object (builder, "display_details");
 
-        if (display_settings_get_n_active_outputs() != 1)
+        if (display_settings_get_n_active_outputs() > 1)
         {
             current_mode = xfce_randr_find_mode_by_id (xfce_randr, display_id,
                                                        xfce_randr->mode[display_id]);
@@ -1110,8 +1110,11 @@ display_setting_mirror_displays_toggled (GtkToggleButton *togglebutton,
         /* Activate mirror-mode */
 
         /* Apply mirror settings to each monitor */
-        for (n = 0; n < display_settings_get_n_active_outputs (); n++)
+        for (n = 0; n < xfce_randr->noutput; n++)
         {
+            if (xfce_randr->mode[n] == None)
+                continue;
+
             xfce_randr->relation[n] = XFCE_RANDR_PLACEMENT_MIRROR;
             xfce_randr->related_to[n] = active_output;
 
@@ -1792,7 +1795,7 @@ display_settings_show_minimal_dialog (GdkDisplay  *display,
         gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (fake_button), TRUE);
 
         //
-        if ( display_settings_get_n_active_outputs () == 1 )
+        if (xfce_randr->noutput > 1)
         {
             gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (only_display1),
                                          xfce_randr->mode[0] != None);


More information about the Xfce4-commits mailing list