Merge pull request #3367 from orestisf1993/dragloop_callback
Call dragloop callback on DRAG_SUCCESS
This commit is contained in:
commit
6d3fc089f9
|
@ -742,11 +742,16 @@ static bool drain_drag_events(EV_P, struct drag_x11_cb *dragloop) {
|
||||||
free(event);
|
free(event);
|
||||||
|
|
||||||
if (dragloop->result != DRAGGING) {
|
if (dragloop->result != DRAGGING) {
|
||||||
free(last_motion_notify);
|
|
||||||
ev_break(EV_A_ EVBREAK_ONE);
|
ev_break(EV_A_ EVBREAK_ONE);
|
||||||
|
if (dragloop->result == DRAG_SUCCESS) {
|
||||||
|
/* Ensure motion notify events are handled. */
|
||||||
|
break;
|
||||||
|
} else {
|
||||||
|
free(last_motion_notify);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if (last_motion_notify == NULL) {
|
if (last_motion_notify == NULL) {
|
||||||
return true;
|
return true;
|
||||||
|
@ -766,7 +771,7 @@ static bool drain_drag_events(EV_P, struct drag_x11_cb *dragloop) {
|
||||||
FREE(last_motion_notify);
|
FREE(last_motion_notify);
|
||||||
|
|
||||||
xcb_flush(conn);
|
xcb_flush(conn);
|
||||||
return false;
|
return dragloop->result != DRAGGING;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void xcb_drag_prepare_cb(EV_P_ ev_prepare *w, int revents) {
|
static void xcb_drag_prepare_cb(EV_P_ ev_prepare *w, int revents) {
|
||||||
|
|
Loading…
Reference in New Issue