summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarcel Hollerbach <marcel-hollerbach@t-online.de>2017-02-14 21:52:33 +0100
committerMarcel Hollerbach <marcel-hollerbach@t-online.de>2017-02-14 22:10:26 +0100
commit6becc2b1796bad6f09264821259dcb8402a03b85 (patch)
tree9e856b8818b075bbfa40a8cd545e73f6fd607f3d
parentaae335293274175fb101fefce2c6245f916249c7 (diff)
e_exec: split up the free of the instance
otherwise two calls to that free would not sent the event, but free the instance, undependend of the event beeing emitted or not. fix T4963
-rw-r--r--src/bin/e_exec.c36
1 files changed, 20 insertions, 16 deletions
diff --git a/src/bin/e_exec.c b/src/bin/e_exec.c
index 7bfcc36ce..56525074a 100644
--- a/src/bin/e_exec.c
+++ b/src/bin/e_exec.c
@@ -616,21 +616,7 @@ _e_exec_instance_free(E_Exec_Instance *inst)
616 ecore_event_add(E_EVENT_EXEC_DEL, inst, _e_exec_cb_exec_del_free, inst); 616 ecore_event_add(E_EVENT_EXEC_DEL, inst, _e_exec_cb_exec_del_free, inst);
617 return EINA_FALSE; 617 return EINA_FALSE;
618 } 618 }
619 if (inst->desktop) 619
620 e_exec_start_pending = eina_list_remove(e_exec_start_pending,
621 inst->desktop);
622 if (inst->expire_timer) ecore_timer_del(inst->expire_timer);
623 EINA_LIST_FREE(inst->clients, ec)
624 {
625 ec->exe_inst = NULL;
626 e_object_unref(E_OBJECT(ec));
627 }
628 if (inst->desktop) efreet_desktop_free(inst->desktop);
629 if (!inst->phony)
630 {
631 if (inst->exe) ecore_exe_data_set(inst->exe, NULL);
632 }
633 free(inst);
634 return EINA_TRUE; 620 return EINA_TRUE;
635} 621}
636 622
@@ -668,9 +654,27 @@ static void
668_e_exec_cb_exec_del_free(void *data, void *ev EINA_UNUSED) 654_e_exec_cb_exec_del_free(void *data, void *ev EINA_UNUSED)
669{ 655{
670 E_Exec_Instance *inst = data; 656 E_Exec_Instance *inst = data;
657 E_Client *ec;
671 658
672 inst->ref--; 659 inst->ref--;
673 _e_exec_instance_free(inst); 660
661 if (inst->desktop)
662 e_exec_start_pending = eina_list_remove(e_exec_start_pending,
663 inst->desktop);
664 if (inst->expire_timer) ecore_timer_del(inst->expire_timer);
665
666 EINA_LIST_FREE(inst->clients, ec)
667 {
668 ec->exe_inst = NULL;
669 e_object_unref(E_OBJECT(ec));
670 }
671
672 if (inst->desktop) efreet_desktop_free(inst->desktop);
673 if (!inst->phony)
674 {
675 if (inst->exe) ecore_exe_data_set(inst->exe, NULL);
676 }
677 free(inst);
674} 678}
675 679
676static Eina_Bool 680static Eina_Bool