fix drag bug

This commit is contained in:
Eduardo Bart 2012-01-19 23:30:08 -02:00
parent 759b7f43b3
commit 9b9e837e97
1 changed files with 1 additions and 1 deletions

View File

@ -1116,7 +1116,7 @@ void UIWidget::onMouseRelease(const Point& mousePos, Fw::MouseButton button)
callLuaField("onClick");
UIWidgetPtr draggedWidget = g_ui.getDraggingWidget();
if(draggedWidget && containsPoint(mousePos) && button == Fw::MouseLeftButton) {
if(draggedWidget && button == Fw::MouseLeftButton && (containsPoint(mousePos) || asUIWidget() == g_ui.getRootWidget())) {
onDrop(draggedWidget, mousePos);
draggedWidget->onDragLeave(asUIWidget(), mousePos);
draggedWidget->setDragging(false);