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
This commit is contained in:
Carsten Haitzler 2020-01-04 16:04:52 +00:00
parent 04d395f2dd
commit 5ad9734c9a
1 changed files with 8 additions and 1 deletions

View File

@ -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;