From 0d17c1a2a32cd68a25ce61dac29a48caee8c22a7 Mon Sep 17 00:00:00 2001 From: Mike Blumenkrantz Date: Tue, 23 Sep 2014 16:44:17 -0400 Subject: [PATCH] elm_win should not check ELM_ACCEL variable if application has overridden it also simplify these checks to make it more clear how the ordering should work @fix --- legacy/elementary/src/lib/elm_win.c | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/legacy/elementary/src/lib/elm_win.c b/legacy/elementary/src/lib/elm_win.c index 1de2075789..43a3488908 100644 --- a/legacy/elementary/src/lib/elm_win.c +++ b/legacy/elementary/src/lib/elm_win.c @@ -2943,15 +2943,17 @@ _window_layout_stack(Evas_Object *o, Evas_Object_Box_Data *p, void *data) static Eina_Bool _accel_is_gl(void) { - const char *env = NULL; - const char *str = NULL; + const char *str; - if (_elm_config->accel) str = _elm_config->accel; - if (_elm_accel_preference) str = _elm_accel_preference; - if ((_elm_config->accel_override) && (_elm_config->accel)) - str = _elm_config->accel; - env = getenv("ELM_ACCEL"); - if (env) str = env; + str = _elm_config->accel; + if (!_elm_config->accel_override) + { + const char *env = NULL; + + env = getenv("ELM_ACCEL"); + if (env) str = env; + else if (_elm_accel_preference) str = _elm_accel_preference; + } if ((str) && ((!strcasecmp(str, "gl")) || (!strcasecmp(str, "opengl")) ||