From: Enlightenment S. <no-...@en...> - 2011-01-24 22:04:01
|
Log: fix segv when removing items from gadcon Author: jeffdameth Date: 2011-01-24 14:03:53 -0800 (Mon, 24 Jan 2011) New Revision: 56291 Trac: http://trac.enlightenment.org/e/changeset/56291 Modified: trunk/E-MODULES-EXTRA/itask-ng/src/ng_gadcon.c Modified: trunk/E-MODULES-EXTRA/itask-ng/src/ng_gadcon.c =================================================================== --- trunk/E-MODULES-EXTRA/itask-ng/src/ng_gadcon.c 2011-01-24 20:51:58 UTC (rev 56290) +++ trunk/E-MODULES-EXTRA/itask-ng/src/ng_gadcon.c 2011-01-24 22:03:53 UTC (rev 56291) @@ -76,7 +76,6 @@ static void _ngi_gadcon_item_cb_mouse_down(Ngi_Item *it, Ecore_Event_Mouse_Button *ev) { - // evas_event_feed_mouse_down(it->box->ng->win->evas, ev->button, 0, 0, NULL); } static void @@ -87,17 +86,11 @@ static void _ngi_gadcon_item_cb_mouse_in(Ngi_Item *it) { - evas_object_focus_set(it->obj, 1); } static void _ngi_gadcon_item_cb_mouse_out(Ngi_Item *it) { - /*TODO check if it is in mouse_down state */ - evas_event_feed_mouse_up(it->box->ng->evas, 1, 0, 0, NULL); - evas_event_feed_mouse_up(it->box->ng->evas, 2, 0, 0, NULL); - evas_event_feed_mouse_up(it->box->ng->evas, 3, 0, 0, NULL); - evas_object_focus_set(it->obj, 0); } static void @@ -642,10 +635,13 @@ e_gadcon_client_config_del(it->gadcon->cf, cgc); - cfdata->box->cfg->gadcon_items = eina_list_remove(cfdata->box->cfg->gadcon_items, it->cfg_gadcon); + cfdata->box->cfg->gadcon_items = + eina_list_remove(cfdata->box->cfg->gadcon_items, it->cfg_gadcon); eina_hash_del_by_key(ngi_gadcon_hash, it->cfg_gadcon->name); e_gadcon_unpopulate(it->gadcon); + it->obj = NULL; + it->box->items = eina_list_remove(it->box->items, it); ngi_item_free(it); e_config_save_queue(); |