diff --git a/src/bin/e_randr.c b/src/bin/e_randr.c index 5f4cada8f..bdd46b4c1 100644 --- a/src/bin/e_randr.c +++ b/src/bin/e_randr.c @@ -63,7 +63,9 @@ _init(void) if (e_randr_screen_info.randr_version >= ECORE_X_RANDR_1_2) { - _12_policies_restore(); + if ((e_config->randr_serialized_setup) && + (e_config->randr_serialized_setup->outputs_policies)) + _12_policies_restore(); } return EINA_TRUE; @@ -142,13 +144,16 @@ _event_listeners_add(void) static void _try_restore_configuration(void) { - if (e_randr_screen_info.randr_version == ECORE_X_RANDR_1_1) + if (e_config->randr_serialized_setup) { - _11_try_restore_configuration(); - } - else if (e_randr_screen_info.randr_version >= ECORE_X_RANDR_1_2) - { - _12_try_restore_configuration(); + if (e_randr_screen_info.randr_version == ECORE_X_RANDR_1_1) + { + _11_try_restore_configuration(); + } + else if (e_randr_screen_info.randr_version >= ECORE_X_RANDR_1_2) + { + _12_try_restore_configuration(); + } } } diff --git a/src/bin/e_randr_12.c b/src/bin/e_randr_12.c index 7f485422c..dfd63a8e6 100644 --- a/src/bin/e_randr_12.c +++ b/src/bin/e_randr_12.c @@ -305,7 +305,8 @@ _12_screen_info_refresh(void) { EINA_SAFETY_ON_TRUE_RETURN(e_randr_screen_info.randr_version < ECORE_X_RANDR_1_2); - _12_screen_info_free(e_randr_screen_info.rrvd_info.randr_info_12); + if (e_randr_screen_info.rrvd_info.randr_info_12) + _12_screen_info_free(e_randr_screen_info.rrvd_info.randr_info_12); e_randr_screen_info.rrvd_info.randr_info_12 = _screen_info_12_new(); _structs_init(); _screen_primary_output_assign(NULL);