ddata.len = data->length;
ddata.action = sel->action;
EINA_INLIST_FOREACH_SAFE(dropable->cbs_list, itr, cbs)
- if (cbs->dropcb)
+ if ((cbs->types & dropable->last.format) && cbs->dropcb)
cbs->dropcb(cbs->dropdata, dropable->obj, &ddata);
goto end;
}
ddata.len = data->length;
ddata.action = sel->action;
EINA_INLIST_FOREACH_SAFE(dropable->cbs_list, itr, cbs)
- if (cbs->dropcb)
+ if ((cbs->types & dropable->last.format) && cbs->dropcb)
cbs->dropcb(cbs->dropdata, dropable->obj, &ddata);
ecore_x_dnd_send_finished();
}
{
cnp_debug("same obj dropable %p\n", dropable->obj);
EINA_INLIST_FOREACH_SAFE(dropable->cbs_list, itr, cbs)
- if (cbs->poscb)
+ if ((cbs->types & dropable->last.format) && cbs->poscb)
cbs->poscb(cbs->posdata, dropable->obj, x, y, action);
}
else
last_dropable->last.type = NULL;
dropable->last.in = EINA_TRUE;
EINA_INLIST_FOREACH_SAFE(dropable->cbs_list, itr, cbs)
- if (cbs->entercb)
+ if ((cbs->types & dropable->last.format) && cbs->entercb)
cbs->entercb(cbs->enterdata, dropable->obj);
EINA_INLIST_FOREACH_SAFE(last_dropable->cbs_list, itr, cbs)
- if (cbs->leavecb)
+ if ((cbs->types & last_dropable->last.format) && cbs->leavecb)
cbs->leavecb(cbs->leavedata, last_dropable->obj);
}
else // leave last obj
last_dropable->last.in = EINA_FALSE;
last_dropable->last.type = NULL;
EINA_INLIST_FOREACH_SAFE(last_dropable->cbs_list, itr, cbs)
- if (cbs->leavecb)
+ if ((cbs->types & last_dropable->last.format) && cbs->leavecb)
cbs->leavecb(cbs->leavedata, last_dropable->obj);
}
}
dropable->last.in = EINA_TRUE;
EINA_INLIST_FOREACH_SAFE(dropable->cbs_list, itr, cbs)
{
- if (cbs->entercb)
- cbs->entercb(cbs->enterdata, dropable->obj);
- if (cbs->poscb)
- cbs->poscb(cbs->posdata, dropable->obj, x, y, action);
+ if (cbs->types & dropable->last.format)
+ {
+ if (cbs->entercb)
+ cbs->entercb(cbs->enterdata, dropable->obj);
+ if (cbs->poscb)
+ cbs->poscb(cbs->posdata, dropable->obj, x, y, action);
+ }
}
}
else
snprintf(entrytag, len + 1, tagstring, savedtypes.imgfile);
ddata.data = entrytag;
cnp_debug("Insert %s\n", (char *)ddata.data);
- if (cbs->dropcb)
+ if ((cbs->types & dropable->last.format) && cbs->dropcb)
cbs->dropcb(cbs->dropdata, dropable->obj, &ddata);
}
else if (cbs->types & ELM_SEL_FORMAT_IMAGE)
cnp_debug("Doing image insert (%s)\n", savedtypes.imgfile);
ddata.format = ELM_SEL_FORMAT_IMAGE;
ddata.data = (char *)savedtypes.imgfile;
- if (cbs->dropcb)
+ if ((cbs->types & dropable->last.format) && cbs->dropcb)
cbs->dropcb(cbs->dropdata, dropable->obj, &ddata);
}
else