mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
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:
parent
6d38f25d46
commit
89750d568a
@ -988,8 +988,6 @@ nsDragService::TargetSetLastContext(GtkWidget *aWidget,
|
||||
NS_IMETHODIMP
|
||||
nsDragService::TargetStartDragMotion(void)
|
||||
{
|
||||
PR_LOG(sDragLm, PR_LOG_DEBUG, ("nsDragService::TargetStartDragMotion"));
|
||||
mCanDrop = false;
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
|
@ -3354,7 +3354,8 @@ nsWindow::OnDragMotionEvent(GtkWidget *aWidget,
|
||||
|
||||
// get our drag context
|
||||
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
|
||||
// happened on
|
||||
@ -3378,9 +3379,9 @@ nsWindow::OnDragMotionEvent(GtkWidget *aWidget,
|
||||
CheckNeedDragLeave(innerMostWidget, dragService, aDragContext, retx, rety);
|
||||
|
||||
// update the drag context
|
||||
dragSessionGTK->TargetSetLastContext(aWidget, aDragContext, aTime);
|
||||
// notify the drag service that we are starting a drag motion.
|
||||
dragSessionGTK->TargetStartDragMotion();
|
||||
dragServiceGTK->TargetSetLastContext(aWidget, aDragContext, aTime);
|
||||
|
||||
dragServiceGTK->SetCanDrop(false);
|
||||
|
||||
dragService->FireDragEventAtSource(NS_DRAGDROP_DRAG);
|
||||
|
||||
@ -3395,11 +3396,12 @@ nsWindow::OnDragMotionEvent(GtkWidget *aWidget,
|
||||
nsEventStatus status;
|
||||
innerMostWidget->DispatchEvent(&event, status);
|
||||
|
||||
// we're done with the drag motion event. notify the drag service.
|
||||
dragSessionGTK->TargetEndDragMotion(aWidget, aDragContext, aTime);
|
||||
// Reply to tell the source whether we can drop and what action would be
|
||||
// taken.
|
||||
dragServiceGTK->TargetEndDragMotion(aWidget, aDragContext, aTime);
|
||||
|
||||
// and unset our context
|
||||
dragSessionGTK->TargetSetLastContext(0, 0, 0);
|
||||
dragServiceGTK->TargetSetLastContext(0, 0, 0);
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user