elementary: Fix bug in wl dnd where all subsequent mimetypes would be

accepted

This fixes an issue where in wl dnd, if one mimetype was accepted by a
drop, then all subsequent types would have been accepted also..

@fix

Signed-off-by: Chris Michael <cpmichael@osg.samsung.com>
This commit is contained in:
Chris Michael 2016-06-29 09:59:32 -04:00
parent 0addbf9b44
commit 2c85f3b525
1 changed files with 6 additions and 3 deletions

View File

@ -3469,10 +3469,13 @@ _wl_dnd_enter(void *data EINA_UNUSED, int type EINA_UNUSED, void *event)
doaccept = EINA_FALSE;
for (i = 0; i < ev->num_types; i++)
{
doaccept |= _wl_drops_accept(ev->types[i]);
if (doaccept)
wl_data_offer_accept(ev->offer, ev->serial, ev->types[i]);
if (_wl_drops_accept(ev->types[i]))
{
doaccept = EINA_TRUE;
wl_data_offer_accept(ev->offer, ev->serial, ev->types[i]);
}
}
if (!doaccept)
wl_data_offer_accept(ev->offer, ev->serial, NULL);