зеркало из https://github.com/mozilla/gecko-dev.git
b=497498 use nsDragService::SetCanDrop instead of nsIDragSessionGTK::StartDragMotion to reset before NS_DRAGDROP_OVER r=roc
--HG-- extra : rebase_source : 776784c43b2d3e8edb4a4a91d507f74fce03f589
This commit is contained in:
Родитель
3e422a68cc
Коммит
6e0ef1cb87
|
@ -988,8 +988,6 @@ nsDragService::TargetSetLastContext(GtkWidget *aWidget,
|
||||||
NS_IMETHODIMP
|
NS_IMETHODIMP
|
||||||
nsDragService::TargetStartDragMotion(void)
|
nsDragService::TargetStartDragMotion(void)
|
||||||
{
|
{
|
||||||
PR_LOG(sDragLm, PR_LOG_DEBUG, ("nsDragService::TargetStartDragMotion"));
|
|
||||||
mCanDrop = false;
|
|
||||||
return NS_OK;
|
return NS_OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -3354,7 +3354,8 @@ nsWindow::OnDragMotionEvent(GtkWidget *aWidget,
|
||||||
|
|
||||||
// get our drag context
|
// get our drag context
|
||||||
nsCOMPtr<nsIDragService> dragService = do_GetService(kCDragServiceCID);
|
nsCOMPtr<nsIDragService> dragService = do_GetService(kCDragServiceCID);
|
||||||
nsCOMPtr<nsIDragSessionGTK> dragSessionGTK = do_QueryInterface(dragService);
|
nsDragService *dragServiceGTK =
|
||||||
|
static_cast<nsDragService*>(dragService.get());
|
||||||
|
|
||||||
// first, figure out which internal widget this drag motion actually
|
// first, figure out which internal widget this drag motion actually
|
||||||
// happened on
|
// happened on
|
||||||
|
@ -3378,9 +3379,9 @@ nsWindow::OnDragMotionEvent(GtkWidget *aWidget,
|
||||||
CheckNeedDragLeave(innerMostWidget, dragService, aDragContext, retx, rety);
|
CheckNeedDragLeave(innerMostWidget, dragService, aDragContext, retx, rety);
|
||||||
|
|
||||||
// update the drag context
|
// update the drag context
|
||||||
dragSessionGTK->TargetSetLastContext(aWidget, aDragContext, aTime);
|
dragServiceGTK->TargetSetLastContext(aWidget, aDragContext, aTime);
|
||||||
// notify the drag service that we are starting a drag motion.
|
|
||||||
dragSessionGTK->TargetStartDragMotion();
|
dragServiceGTK->SetCanDrop(false);
|
||||||
|
|
||||||
dragService->FireDragEventAtSource(NS_DRAGDROP_DRAG);
|
dragService->FireDragEventAtSource(NS_DRAGDROP_DRAG);
|
||||||
|
|
||||||
|
@ -3395,11 +3396,12 @@ nsWindow::OnDragMotionEvent(GtkWidget *aWidget,
|
||||||
nsEventStatus status;
|
nsEventStatus status;
|
||||||
innerMostWidget->DispatchEvent(&event, status);
|
innerMostWidget->DispatchEvent(&event, status);
|
||||||
|
|
||||||
// we're done with the drag motion event. notify the drag service.
|
// Reply to tell the source whether we can drop and what action would be
|
||||||
dragSessionGTK->TargetEndDragMotion(aWidget, aDragContext, aTime);
|
// taken.
|
||||||
|
dragServiceGTK->TargetEndDragMotion(aWidget, aDragContext, aTime);
|
||||||
|
|
||||||
// and unset our context
|
// and unset our context
|
||||||
dragSessionGTK->TargetSetLastContext(0, 0, 0);
|
dragServiceGTK->TargetSetLastContext(0, 0, 0);
|
||||||
|
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
Загрузка…
Ссылка в новой задаче