ecore-wl2: Raise event for dnd leave
authorChris Michael <cp.michael@samsung.com>
Fri, 25 Sep 2015 14:39:31 +0000 (10:39 -0400)
committerChris Michael <cp.michael@samsung.com>
Thu, 3 Dec 2015 17:02:40 +0000 (12:02 -0500)
Signed-off-by: Chris Michael <cp.michael@samsung.com>
src/lib/ecore_wl2/ecore_wl2_dnd.c

index e3545a2..ac315d6 100644 (file)
@@ -95,7 +95,17 @@ _ecore_wl2_dnd_enter(Ecore_Wl2_Input *input, struct wl_data_offer *offer, struct
 void
 _ecore_wl2_dnd_leave(Ecore_Wl2_Input *input)
 {
-   /* TODO: raise dnd leave event */
+   Ecore_Wl2_Event_Dnd_Leave *ev;
+
+   ev = calloc(1, sizeof(Ecore_Wl2_Event_Dnd_Leave));
+   if (!ev) return;
+
+   if (input->focus.pointer)
+     ev->win = input->focus.pointer->id;
+   if (input->focus.keyboard)
+     ev->source = input->focus.keyboard->id;
+
+   ecore_event_add(ECORE_WL2_EVENT_DND_LEAVE, ev, NULL, NULL);
 }
 
 void