rimmed pushed a commit to branch master. http://git.enlightenment.org/tools/eflete.git/commit/?id=c8b1762afce74bf97a1cc6fda13f77bb16bb6c18
commit c8b1762afce74bf97a1cc6fda13f77bb16bb6c18 Author: Andrii Kroitor <an.kroi...@samsung.com> Date: Mon Nov 9 16:05:11 2015 +0200 workspace: fix segfault after closing tab @fix #48232 --- src/bin/ui/tabs.c | 12 ++++++++++++ src/bin/ui/workspace/workspace.c | 22 ++++------------------ 2 files changed, 16 insertions(+), 18 deletions(-) diff --git a/src/bin/ui/tabs.c b/src/bin/ui/tabs.c index ed9d3b4..7bbb358 100644 --- a/src/bin/ui/tabs.c +++ b/src/bin/ui/tabs.c @@ -253,6 +253,17 @@ _part_renamed(void *data __UNUSED__, } static void +_part_unselected(void *data __UNUSED__, + Evas_Object *obj __UNUSED__, + void *ei __UNUSED__) +{ + assert(tabs.current_group != NULL); + assert(tabs.current_workspace != NULL); + + workspace_highlight_unset(tabs.current_workspace); +} + +static void _project_changed(void *data __UNUSED__, Evas_Object *obj __UNUSED__, void *ei __UNUSED__) @@ -408,6 +419,7 @@ tabs_add(void) evas_object_smart_callback_add(ap.win, SIGNAL_PART_ADDED, _part_added, NULL); evas_object_smart_callback_add(ap.win, SIGNAL_PART_DELETED, _part_deleted, NULL); evas_object_smart_callback_add(ap.win, SIGNAL_PART_RENAMED, _part_renamed, NULL); + evas_object_smart_callback_add(ap.win, SIGNAL_PART_UNSELECTED, _part_unselected, NULL); evas_object_smart_callback_add(ap.win, SIGNAL_PROJECT_CHANGED, _project_changed, NULL); evas_object_smart_callback_add(ap.win, SIGNAL_EDITOR_SAVED, _editor_saved, NULL); evas_object_smart_callback_add(ap.win, SIGNAL_PROJECT_OPENED, _project_opened, NULL); diff --git a/src/bin/ui/workspace/workspace.c b/src/bin/ui/workspace/workspace.c index 4426ec3..779f1c8 100644 --- a/src/bin/ui/workspace/workspace.c +++ b/src/bin/ui/workspace/workspace.c @@ -895,8 +895,8 @@ _workspace_highlight_set(Evas_Object *obj, Part_ *part) return true; } -static Eina_Bool -_workspace_highlight_unset(Evas_Object *obj) +Eina_Bool +workspace_highlight_unset(Evas_Object *obj) { WS_DATA_GET(obj, sd) if ((!sd->highlight.highlight) || (!sd->highlight.space_hl)) return false; @@ -1367,7 +1367,7 @@ _on_group_navigator_part_select(void *data, WS_DATA_GET(workspace, sd); TODO("Combine this methods to one") - _workspace_highlight_unset(workspace); + workspace_highlight_unset(workspace); _workspace_highlight_set(workspace, part); evas_object_smart_callback_call(ap.win, SIGNAL_PART_SELECTED, (void *)part); @@ -1397,22 +1397,10 @@ _on_groupedit_part_unselect(void *data, WS_DATA_GET(workspace, sd); - _workspace_highlight_unset(workspace); + workspace_highlight_unset(workspace); group_navigator_part_select(sd->group_navigator, NULL); } -static void -_on_group_navigator_part_unselect(void *data, - Evas_Object *obj __UNUSED__, - void *event_info __UNUSED__) -{ - Evas_Object *workspace = (Evas_Object *)data; - - WS_DATA_GET(workspace, sd); - - _workspace_highlight_unset(workspace); -} - Evas_Object * workspace_add(Evas_Object *parent, Group *group) { @@ -1470,8 +1458,6 @@ workspace_add(Evas_Object *parent, Group *group) _on_groupedit_part_select, obj); evas_object_smart_callback_add(sd->groupedit, SIGNAL_GROUPEDIT_PART_UNSELECTED, _on_groupedit_part_unselect, obj); - evas_object_smart_callback_add(ap.win, SIGNAL_PART_UNSELECTED, - _on_group_navigator_part_unselect, obj); evas_object_smart_callback_add(sd->groupedit, "container,changed", _ws_ruler_abs_zero_move_cb, obj); evas_object_smart_callback_add(sd->groupedit, "object,area,changed", --