From 23e171b7b7148c8670c968d7fca7a1845a52855c Mon Sep 17 00:00:00 2001 From: Christopher Michael Date: Tue, 9 Oct 2012 12:15:09 +0000 Subject: [PATCH] Actually, use the real rate value from the mode. This allows similar modes with the same rate to correctly select the proper radio. Signed-off-by: Christopher Michael SVN revision: 77642 --- src/modules/conf_randr/e_smart_monitor.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/modules/conf_randr/e_smart_monitor.c b/src/modules/conf_randr/e_smart_monitor.c index 418d7e69f..4fc034589 100644 --- a/src/modules/conf_randr/e_smart_monitor.c +++ b/src/modules/conf_randr/e_smart_monitor.c @@ -199,7 +199,9 @@ e_smart_monitor_crtc_set(Evas_Object *obj, E_Randr_Crtc_Info *crtc) sd->orientation = crtc->current_orientation; sd->rotation = _e_smart_monitor_rotation_get(sd->orientation); sd->mode = crtc->current_mode; - sd->rate = sd->mode->xid; + + sd->rate = ((float)sd->mode->dotClock / + ((float)sd->mode->hTotal * (float)sd->mode->vTotal)); EINA_LIST_FOREACH(crtc->outputs, l, output) { @@ -1274,7 +1276,7 @@ _e_smart_monitor_refresh_rates_refill(Evas_Object *obj) snprintf(buff, sizeof(buff), "%.1fHz", rate); - ow = e_widget_radio_add(evas, buff, mode->xid, rg); + ow = e_widget_radio_add(evas, buff, abs((int)rate), rg); e_widget_list_object_append(sd->o_refresh, ow, 1, 0, 0.5); } }