[Xfce4-commits] [xfce/xfce4-settings] 01/01: Better support for variations of randr name, change rate hz precision (Fix 10661, Partial 11423)

noreply at xfce.org noreply at xfce.org
Sat Jan 31 18:18:52 CET 2015


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

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

commit 80c297fa6c4b86621a9e1333d1ee6deb6a849f53
Author: Sean Davis <smd.seandavis at gmail.com>
Date:   Sat Jan 31 12:18:45 2015 -0500

    Better support for variations of randr name, change rate hz precision (Fix 10661, Partial 11423)
---
 xfsettingsd/displays.c |    9 +++++++--
 1 file changed, 7 insertions(+), 2 deletions(-)

diff --git a/xfsettingsd/displays.c b/xfsettingsd/displays.c
index 3497804..6e1c55e 100644
--- a/xfsettingsd/displays.c
+++ b/xfsettingsd/displays.c
@@ -695,9 +695,14 @@ xfce_displays_helper_load_from_xfconf (XfceDisplaysHelper *helper,
             rate = (gdouble) helper->resources->modes[m].dotClock /
                     ((gdouble) helper->resources->modes[m].hTotal * (gdouble) helper->resources->modes[m].vTotal);
 
+            /* construct a string equivalent to the mode generated in displays */
+            /* property is the resources mode translated into display panel name */
+            g_snprintf (property, sizeof (property), "%dx%d", helper->resources->modes[m].width,
+                        helper->resources->modes[m].height);
+
             /* find the mode corresponding to the saved values */
-            if (rint (rate) == rint (output_rate)
-                && (g_strcmp0 (helper->resources->modes[m].name, str_value) == 0))
+            if (rint (rate * 10) == rint (output_rate * 10)
+                && (g_strcmp0 (property, str_value) == 0))
             {
                 valid_mode = helper->resources->modes[m].id;
                 break;

-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.


More information about the Xfce4-commits mailing list