cedric pushed a commit to branch master.

http://git.enlightenment.org/core/efl.git/commit/?id=3b7607d7f622ceaab7aa30790ce79b6792f230e1

commit 3b7607d7f622ceaab7aa30790ce79b6792f230e1
Author: Cedric Bail <[email protected]>
Date:   Thu Nov 9 18:07:31 2017 -0800

    ecore_evas: improve ecore_evas fallback animator logic for legacy case.
    
    In Enlightenment with internal window being WL window connected to the
    X11 backend, you end up with the later requiring the former to tick, even
    if the former do not have a proper animator source. To work around the
    problem when there is one backend that is not providing support for
    animator source, we do need to avoid switching on another window source
    as they could be linked somehow and we can not know.
---
 src/lib/ecore_evas/ecore_evas.c | 15 ++++++++++++++-
 1 file changed, 14 insertions(+), 1 deletion(-)

diff --git a/src/lib/ecore_evas/ecore_evas.c b/src/lib/ecore_evas/ecore_evas.c
index 77ab679107..11c043e606 100644
--- a/src/lib/ecore_evas/ecore_evas.c
+++ b/src/lib/ecore_evas/ecore_evas.c
@@ -3148,6 +3148,7 @@ _ecore_evas_tick_source_find(void)
    Ecore_Evas *ee;
    Eina_Bool source = EINA_FALSE;
 
+   // Check if we do have a potential tick source for legacy
    EINA_INLIST_FOREACH(ecore_evases, ee)
      if (!ee->deleted &&
          ee->engine.func->fn_animator_register &&
@@ -3157,7 +3158,19 @@ _ecore_evas_tick_source_find(void)
           break;
        }
 
-   // If no source is available for ticking, fallback to timer.
+   // If just one source require fallback, we can't be sure that
+   // we are not running enlightenment and that this source might
+   // actually be the true tick source of all other window. In
+   // that scenario, we have to forcefully fallback.
+   EINA_INLIST_FOREACH(ecore_evases, ee)
+     if (!ee->deleted &&
+         (!ee->engine.func->fn_animator_register ||
+          !ee->engine.func->fn_animator_unregister))
+       {
+          source = EINA_FALSE;
+          break;
+       }
+
    if (!source)
      {
         ecore_animator_source_set(ECORE_ANIMATOR_SOURCE_TIMER);

-- 


Reply via email to