forked from enlightenment/efl
Revert "ecore wl2 - dnd - handle NULL drags... shouldnt happen but does"
This reverts commit 85e5858466
.
please do not randomly add null checks for the purpose of quickly closing tickets.
This commit is contained in:
parent
85e5858466
commit
451a93d9d2
|
@ -316,16 +316,14 @@ _ecore_wl2_dnd_leave(Ecore_Wl2_Input *input)
|
|||
if (input->focus.keyboard)
|
||||
ev->source = input->focus.keyboard->id;
|
||||
|
||||
if (input->drag)
|
||||
ev->win = input->drag->window_id;
|
||||
ev->win = input->drag->window_id;
|
||||
ev->offer = input->drag;
|
||||
ev->offer->ref++;
|
||||
ev->seat = input->id;
|
||||
ev->display = input->display;
|
||||
ev->display->refs++;
|
||||
|
||||
if (input->drag)
|
||||
input->drag->window_id = 0;
|
||||
input->drag->window_id = 0;
|
||||
ecore_event_add(ECORE_WL2_EVENT_DND_LEAVE, ev, _delay_offer_destroy, ev->offer);
|
||||
input->drag = NULL;
|
||||
}
|
||||
|
@ -341,14 +339,12 @@ _ecore_wl2_dnd_motion(Ecore_Wl2_Input *input, int x, int y, uint32_t serial)
|
|||
ev = calloc(1, sizeof(Ecore_Wl2_Event_Dnd_Motion));
|
||||
if (!ev) return;
|
||||
|
||||
if (input->drag)
|
||||
input->drag->serial = serial;
|
||||
input->drag->serial = serial;
|
||||
|
||||
if (input->focus.keyboard)
|
||||
ev->source = input->focus.keyboard->id;
|
||||
|
||||
if (input->drag)
|
||||
ev->win = input->drag->window_id;
|
||||
ev->win = input->drag->window_id;
|
||||
ev->x = x;
|
||||
ev->y = y;
|
||||
ev->offer = input->drag;
|
||||
|
@ -370,8 +366,7 @@ _ecore_wl2_dnd_drop(Ecore_Wl2_Input *input)
|
|||
if (input->focus.keyboard)
|
||||
ev->source = input->focus.keyboard->id;
|
||||
|
||||
if (input->drag)
|
||||
ev->win = input->drag->window_id;
|
||||
ev->win = input->drag->window_id;
|
||||
ev->x = input->pointer.sx;
|
||||
ev->y = input->pointer.sy;
|
||||
ev->offer = input->drag;
|
||||
|
|
Loading…
Reference in New Issue