raster pushed a commit to branch master.

http://git.enlightenment.org/core/enlightenment.git/commit/?id=5ad9734c9a3e42a1c2e4c1e04bfb86295c9cf62a

commit 5ad9734c9a3e42a1c2e4c1e04bfb86295c9cf62a
Author: Carsten Haitzler (Rasterman) <[email protected]>
Date:   Sat Jan 4 16:04:52 2020 +0000

    randr - dont save instantly inline - comp may not be up. defer in job
    
    save in a job later ... not instantly. as ave may involve an error
    which may involve a dialog coming up which if compis not up yet...
    boom.
    
    @fix
---
 src/bin/e_randr2.c | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)

diff --git a/src/bin/e_randr2.c b/src/bin/e_randr2.c
index 4b525f979..4c4917da3 100644
--- a/src/bin/e_randr2.c
+++ b/src/bin/e_randr2.c
@@ -5,6 +5,7 @@
 /////////////////////////////////////////////////////////////////////////
 static Eina_Bool               _screen_closed(E_Randr2_Screen *s);
 static void                    _animated_apply_abort(void);
+static void                    _cb_delay_init_save(void *data);
 static Eina_Bool               _cb_delay_timer(void *data);
 static Eina_Bool               _cb_fade_animator(void *data);
 static void                    _animated_apply(void);
@@ -40,6 +41,12 @@ E_API E_Randr2        *e_randr2 = NULL;
 
 E_API int              E_EVENT_RANDR_CHANGE = 0;
 
+static void
+_cb_delay_init_save(void *data EINA_UNUSED)
+{
+   e_randr2_config_save();
+}
+
 /////////////////////////////////////////////////////////////////////////
 EINTERN Eina_Bool
 e_randr2_init(void)
@@ -105,7 +112,7 @@ e_randr2_init(void)
    else
      {
         _config_update(e_randr2, e_randr2_cfg, 0);
-        e_randr2_config_save();
+        ecore_job_add(_cb_delay_init_save, NULL);
      }
    ecore_event_add(E_EVENT_RANDR_CHANGE, NULL, NULL, NULL);
    return EINA_TRUE;

-- 


Reply via email to