forked from enlightenment/efl
ecore-wl2: Fix dnd to function when source window and target window
are same Signed-off-by: Chris Michael <cp.michael@samsung.com>
This commit is contained in:
parent
8683c6ecf6
commit
0f49297c18
|
@ -118,6 +118,8 @@ _source_cb_cancelled(void *data, struct wl_data_source *source)
|
||||||
if (input->focus.keyboard)
|
if (input->focus.keyboard)
|
||||||
ev->source = input->focus.keyboard->id;
|
ev->source = input->focus.keyboard->id;
|
||||||
|
|
||||||
|
if (!ev->win) ev->win = ev->source;
|
||||||
|
|
||||||
ecore_event_add(ECORE_WL2_EVENT_DATA_SOURCE_CANCELLED, ev, NULL, NULL);
|
ecore_event_add(ECORE_WL2_EVENT_DATA_SOURCE_CANCELLED, ev, NULL, NULL);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -310,6 +312,8 @@ _ecore_wl2_dnd_enter(Ecore_Wl2_Input *input, struct wl_data_offer *offer, struct
|
||||||
if (input->focus.keyboard)
|
if (input->focus.keyboard)
|
||||||
ev->source = input->focus.keyboard->id;
|
ev->source = input->focus.keyboard->id;
|
||||||
|
|
||||||
|
if (!ev->win) ev->win = ev->source;
|
||||||
|
|
||||||
ev->x = x;
|
ev->x = x;
|
||||||
ev->y = y;
|
ev->y = y;
|
||||||
ev->offer = offer;
|
ev->offer = offer;
|
||||||
|
@ -333,6 +337,8 @@ _ecore_wl2_dnd_leave(Ecore_Wl2_Input *input)
|
||||||
if (input->focus.keyboard)
|
if (input->focus.keyboard)
|
||||||
ev->source = input->focus.keyboard->id;
|
ev->source = input->focus.keyboard->id;
|
||||||
|
|
||||||
|
if (!ev->win) ev->win = ev->source;
|
||||||
|
|
||||||
ecore_event_add(ECORE_WL2_EVENT_DND_LEAVE, ev, NULL, NULL);
|
ecore_event_add(ECORE_WL2_EVENT_DND_LEAVE, ev, NULL, NULL);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -352,6 +358,8 @@ _ecore_wl2_dnd_motion(Ecore_Wl2_Input *input, int x, int y, unsigned int timesta
|
||||||
if (input->focus.keyboard)
|
if (input->focus.keyboard)
|
||||||
ev->source = input->focus.keyboard->id;
|
ev->source = input->focus.keyboard->id;
|
||||||
|
|
||||||
|
if (!ev->win) ev->win = ev->source;
|
||||||
|
|
||||||
ev->x = x;
|
ev->x = x;
|
||||||
ev->y = y;
|
ev->y = y;
|
||||||
ev->serial = timestamp;
|
ev->serial = timestamp;
|
||||||
|
@ -373,6 +381,8 @@ _ecore_wl2_dnd_drop(Ecore_Wl2_Input *input)
|
||||||
ev->win = input->focus.pointer->id;
|
ev->win = input->focus.pointer->id;
|
||||||
if (input->focus.keyboard)
|
if (input->focus.keyboard)
|
||||||
ev->source = input->focus.keyboard->id;
|
ev->source = input->focus.keyboard->id;
|
||||||
|
|
||||||
|
if (!ev->win) ev->win = ev->source;
|
||||||
}
|
}
|
||||||
|
|
||||||
ev->x = input->pointer.sx;
|
ev->x = input->pointer.sx;
|
||||||
|
@ -523,6 +533,8 @@ ecore_wl2_dnd_drag_end(Ecore_Wl2_Input *input)
|
||||||
if (input->focus.keyboard)
|
if (input->focus.keyboard)
|
||||||
ev->source = input->focus.keyboard->id;
|
ev->source = input->focus.keyboard->id;
|
||||||
|
|
||||||
|
if (!ev->win) ev->win = ev->source;
|
||||||
|
|
||||||
ecore_event_add(ECORE_WL2_EVENT_DND_END, ev, NULL, NULL);
|
ecore_event_add(ECORE_WL2_EVENT_DND_END, ev, NULL, NULL);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue