Add list of monitors to smart_data structure.

Add code to delete the monitors when randr gets deleted.

Signed-off-by: Christopher Michael <cp.michael@samsung.com>

SVN revision: 84128
This commit is contained in:
Christopher Michael 2013-02-19 10:55:39 +00:00 committed by Christopher Michael
parent 468998fca6
commit 6b1168b933
1 changed files with 8 additions and 0 deletions

View File

@ -12,6 +12,9 @@ struct _E_Smart_Data
/* visible flag */ /* visible flag */
Eina_Bool visible : 1; Eina_Bool visible : 1;
/* list of monitors */
Eina_List *monitors;
}; };
/* local function prototypes */ /* local function prototypes */
@ -80,10 +83,15 @@ static void
_e_smart_del(Evas_Object *obj) _e_smart_del(Evas_Object *obj)
{ {
E_Smart_Data *sd; E_Smart_Data *sd;
Evas_Object *mon;
/* try to get the objects smart data */ /* try to get the objects smart data */
if (!(sd = evas_object_smart_data_get(obj))) return; if (!(sd = evas_object_smart_data_get(obj))) return;
/* free the monitors */
EINA_LIST_FREE(sd->monitors, mon)
evas_object_del(mon);
/* delete the layout object */ /* delete the layout object */
if (sd->o_layout) evas_object_del(sd->o_layout); if (sd->o_layout) evas_object_del(sd->o_layout);