void DragContainer::onMouseButtonUp(MouseEventArgs& e) { Window::onMouseButtonUp(e); if (e.button == LeftButton) { if (d_dragging) { // release picked up state if (d_pickedUp) d_pickedUp = false; // fire off event WindowEventArgs args(this); onDragEnded(args); } // check for sticky pick up else if (d_stickyMode && !d_pickedUp) { initialiseDragging(); d_pickedUp = true; // in this case, do not proceed to release inputs. return; } // release our capture on the input data releaseInput(); ++e.handled; } }
void DragAndDropManager::cursorReleased(const PointerEvent& event) { if(!mIsDragInProgress) return; if(!onDragEnded.empty()) { DragCallbackInfo info; onDragEnded(event, info); endDrag(info.processed); } else endDrag(false); Platform::releaseMouseCapture(); }
void DragContainer::onMouseButtonUp(MouseEventArgs& e) { Window::onMouseButtonUp(e); if (e.button == LeftButton) { if (d_dragging) { // fire off event WindowEventArgs args(this); onDragEnded(args); } // release our capture on the input data releaseInput(); e.handled = true; } }