elm_win should not check ELM_ACCEL variable if application has overridden it
authorMike Blumenkrantz <zmike@osg.samsung.com>
Tue, 23 Sep 2014 20:44:17 +0000 (16:44 -0400)
committerMike Blumenkrantz <zmike@osg.samsung.com>
Tue, 23 Sep 2014 20:45:15 +0000 (16:45 -0400)
also simplify these checks to make it more clear how the ordering should work

@fix

src/lib/elm_win.c

index 1de20757892e1a8e24ff2691f23a64a67a0222be..43a3488908ae97c8fede6035f93088bb9479de70 100644 (file)
@@ -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;
-
-   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;
+   const char *str;
+
+   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")) ||