mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 1121946, Implement e10 cursor drag feedback on Windows, r=jmathies
This commit is contained in:
parent
68d7ad88b4
commit
90ad2c07cc
@ -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