devilhorns pushed a commit to branch master.

commit 012a05e5719f3e5920b63b45f3a05d3b1080ac46
Author: Chris Michael <[email protected]>
Date:   Sun May 19 10:29:10 2013 +0100

    Modes is a zero-based list, so preferred needs to be -1.
    
    Signed-off-by: Chris Michael <[email protected]>
---
 src/bin/e_randr.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/bin/e_randr.c b/src/bin/e_randr.c
index 9096e4b..fb7bf98 100644
--- a/src/bin/e_randr.c
+++ b/src/bin/e_randr.c
@@ -1034,7 +1034,7 @@ 
_e_randr_config_output_preferred_mode_get(E_Randr_Output_Config *cfg)
    modes = ecore_x_randr_output_modes_get(root, cfg->xid, &n, &p);
    if ((!modes) || (n == 0)) return 0;
 
-   mode = modes[p];
+   mode = modes[p - 1];
    free(modes);
 
    return mode;

-- 

------------------------------------------------------------------------------
AlienVault Unified Security Management (USM) platform delivers complete
security visibility with the essential security capabilities. Easily and
efficiently configure, manage, and operate all of your security controls
from a single console and one unified framework. Download a free trial.
http://p.sf.net/sfu/alienvault_d2d

Reply via email to