summaryrefslogtreecommitdiff
path: root/src/lib/ecore_wayland/ecore_wl_dnd.c
diff options
context:
space:
mode:
authorvivek <vivek.ellur@samsung.com>2014-09-19 08:42:49 -0400
committerChris Michael <cp.michael@samsung.com>2014-09-19 08:42:49 -0400
commit0e9a691d6253744ca9fe84a2b8ad34b8f0188c1b (patch)
treec568abfd582ec112bf510e4aad007ea255459555 /src/lib/ecore_wayland/ecore_wl_dnd.c
parente096a3490b4834e4552f7418fdabf62cb7986175 (diff)
Ecore_Wayland: Raise a event when data source cancelled
Summary: 1) Created a event struct for data source cancel event 2) Raise a event when data source is cancelled Signed-off-by: vivek <vivek.ellur@samsung.com> Reviewers: devilhorns Subscribers: cedric Differential Revision: https://phab.enlightenment.org/D1465
Diffstat (limited to 'src/lib/ecore_wayland/ecore_wl_dnd.c')
-rw-r--r--src/lib/ecore_wayland/ecore_wl_dnd.c12
1 files changed, 11 insertions, 1 deletions
diff --git a/src/lib/ecore_wayland/ecore_wl_dnd.c b/src/lib/ecore_wayland/ecore_wl_dnd.c
index 7136ba570d..c816e9dc86 100644
--- a/src/lib/ecore_wayland/ecore_wl_dnd.c
+++ b/src/lib/ecore_wayland/ecore_wl_dnd.c
@@ -767,14 +767,24 @@ static void
767_ecore_wl_dnd_source_cb_cancelled(void *data, struct wl_data_source *source) 767_ecore_wl_dnd_source_cb_cancelled(void *data, struct wl_data_source *source)
768{ 768{
769 Ecore_Wl_Input *input; 769 Ecore_Wl_Input *input;
770 Ecore_Wl_Event_Data_Source_Cancelled *ev;
770 771
771 LOGFN(__FILE__, __LINE__, __FUNCTION__); 772 LOGFN(__FILE__, __LINE__, __FUNCTION__);
772 773
773 if (!(input = data)) return; 774 if (!(input = data)) return;
774 775
775 /* FIXME: Raise an Ecore_Wl_Event here */
776 wl_data_source_destroy(source); 776 wl_data_source_destroy(source);
777 if (input->data_source == source) input->data_source = NULL; 777 if (input->data_source == source) input->data_source = NULL;
778
779 if (!(ev = calloc(1, sizeof(Ecore_Wl_Event_Data_Source_Cancelled)))) return;
780
781 if (input->pointer_focus)
782 ev->win = input->pointer_focus->id;
783
784 if (input->keyboard_focus)
785 ev->source = input->keyboard_focus->id;
786
787 ecore_event_add(ECORE_WL_EVENT_DATA_SOURCE_CANCELLED, ev, NULL, NULL);
778} 788}
779 789
780static void 790static void