[Xfce4-commits] <xfce4-settings:xfce-4.8> Don't test for "default" output in xfce_randr_populate (bug #7092).

Nick Schermer noreply at xfce.org
Sun Jan 30 17:36:01 CET 2011


Updating branch refs/heads/xfce-4.8
         to 52877bbe9c18dec778a3421650063f93eb4d169a (commit)
       from cf58888d907726604b5aeef938a7422a88cff73d (commit)

commit 52877bbe9c18dec778a3421650063f93eb4d169a
Author: Jérôme Guelfucci <jeromeg at xfce.org>
Date:   Fri Jan 21 19:57:55 2011 +0100

    Don't test for "default" output in xfce_randr_populate (bug #7092).
    
    We thought this would allow us to detect only the proprietary drivers
    but it also 'blacklists' the nv and prlvideo.
    
    Also remove the code to detect nvidia-settings, as the dialog allows the
    user to at least set the resolutions.
    (cherry picked from commit 7700656c757fcc8e32470a8609a574974a12e1a7)

 dialogs/display-settings/main.c       |   16 ++++------------
 dialogs/display-settings/xfce-randr.c |   25 ++-----------------------
 2 files changed, 6 insertions(+), 35 deletions(-)

diff --git a/dialogs/display-settings/main.c b/dialogs/display-settings/main.c
index 76bf6e8..1706964 100644
--- a/dialogs/display-settings/main.c
+++ b/dialogs/display-settings/main.c
@@ -1103,20 +1103,12 @@ main (gint argc, gchar **argv)
 
         if (!xfce_randr)
         {
-            command = g_find_program_in_path ("nvidia-settings");
+            command = g_find_program_in_path ("amdcccle");
+
             if (command != NULL)
             {
-                alternative = _("NVIDIA Settings");
-                alternative_icon = "nvidia-settings";
-            }
-            else
-            {
-                command = g_find_program_in_path ("amdcccle");
-                if (command != NULL)
-                {
-                    alternative = _("ATI Settings");
-                    alternative_icon = "ccc_small";
-                }
+                alternative = _("ATI Settings");
+                alternative_icon = "ccc_small";
             }
 
             response = xfce_message_dialog (NULL, NULL, GTK_STOCK_DIALOG_ERROR,
diff --git a/dialogs/display-settings/xfce-randr.c b/dialogs/display-settings/xfce-randr.c
index 45b8646..cd16c95 100644
--- a/dialogs/display-settings/xfce-randr.c
+++ b/dialogs/display-settings/xfce-randr.c
@@ -142,7 +142,7 @@ xfce_randr_list_supported_modes (XRRScreenResources *resources,
 
 
 
-static gboolean
+static void
 xfce_randr_populate (XfceRandr *randr,
                      Display   *xdisplay,
                      GdkWindow *root_window)
@@ -175,15 +175,6 @@ xfce_randr_populate (XfceRandr *randr,
 
         /* cache it */
         g_ptr_array_add (outputs, output_info);
-
-        /* check if the device is really a randr 1.2 device */
-        if (n == 0 && strcmp (output_info->name, "default") == 0)
-        {
-            /* free the cache */
-            g_ptr_array_foreach (outputs, (GFunc) XRRFreeOutputInfo, NULL);
-            g_ptr_array_free (outputs, TRUE);
-            return FALSE;
-        }
     }
 
     /* migrate the temporary cache */
@@ -234,8 +225,6 @@ xfce_randr_populate (XfceRandr *randr,
 
     /* clone modes: same RRModes present for all outputs */
     xfce_randr_list_clone_modes (randr);
-
-    return TRUE;
 }
 
 
@@ -285,17 +274,7 @@ xfce_randr_new (GdkDisplay  *display,
     /* get the screen resource */
     randr->resources = XRRGetScreenResources (xdisplay, GDK_WINDOW_XID (root_window));
 
-    if (!xfce_randr_populate (randr, xdisplay, root_window))
-    {
-        /* cleanup */
-        xfce_randr_free (randr);
-
-        /* set error */
-        g_set_error (error, 0, 0, _("The video driver does not support video outputs"));
-
-        /* return nothing */
-        return NULL;
-    }
+    xfce_randr_populate (randr, xdisplay, root_window);
 
     return randr;
 }



More information about the Xfce4-commits mailing list