mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-10 11:55:49 +00:00
Bug 1121946, Implement e10 cursor drag feedback on Windows, r=jmathies
This commit is contained in:
parent
9e7bedeacf
commit
0fb1a1b843
@ -203,6 +203,31 @@ nsNativeDragTarget::ProcessDrag(uint32_t aEventType,
|
||||
// Dispatch the event into Gecko
|
||||
DispatchDragDropEvent(aEventType, ptl);
|
||||
|
||||
// If TakeChildProcessDragAction returns something other than
|
||||
// DRAGDROP_ACTION_UNINITIALIZED, it means that the last event was sent
|
||||
// to the child process and this event is also being sent to the child
|
||||
// process. In this case, use the last event's action instead.
|
||||
nsDragService* dragService = static_cast<nsDragService *>(mDragService);
|
||||
currSession->GetDragAction(&geckoAction);
|
||||
|
||||
int32_t childDragAction = dragService->TakeChildProcessDragAction();
|
||||
if (childDragAction != nsIDragService::DRAGDROP_ACTION_UNINITIALIZED) {
|
||||
geckoAction = childDragAction;
|
||||
}
|
||||
|
||||
if (nsIDragService::DRAGDROP_ACTION_LINK & geckoAction) {
|
||||
*pdwEffect = DROPEFFECT_LINK;
|
||||
}
|
||||
else if (nsIDragService::DRAGDROP_ACTION_COPY & geckoAction) {
|
||||
*pdwEffect = DROPEFFECT_COPY;
|
||||
}
|
||||
else if (nsIDragService::DRAGDROP_ACTION_MOVE & geckoAction) {
|
||||
*pdwEffect = DROPEFFECT_MOVE;
|
||||
}
|
||||
else {
|
||||
*pdwEffect = DROPEFFECT_NONE;
|
||||
}
|
||||
|
||||
if (aEventType != NS_DRAGDROP_DROP) {
|
||||
// Get the cached drag effect from the drag service, the data member should
|
||||
// have been set by whoever handled the WidgetGUIEvent or nsIDOMEvent on
|
||||
|
Loading…
Reference in New Issue
Block a user