elementary: Fix bug in wl dnd where all subsequent mimetypes would be
authorChris Michael <cpmichael@osg.samsung.com>
Wed, 29 Jun 2016 13:59:32 +0000 (09:59 -0400)
committerChris Michael <cpmichael@osg.samsung.com>
Wed, 29 Jun 2016 13:59:32 +0000 (09:59 -0400)
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>
src/lib/elementary/elm_cnp.c

index 31b8dbc..8f34a00 100644 (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);