I am implementing drag and drop support in web view. I am calling below API's on specific events.
1. DragTargetDragEnter - call when we have selected data to drag, press and hold mouse left button. also calling SendMouseClickEvent before DragTargetDragEnter.
2. DragTargetDragOver - call when we hold and move mouse till we drop, also calling SendMouseMoveEvent before DragTargetDragOver.
3. DragTargetDrop - call when we release mouse left button. also calling SendMouseClickEvent before DragTargetDrop.
DragOperationsMask = DRAG_OPERATION_EVERY,
MouseEvent Modifier = EVENTFLAG_LEFT_MOUSE_BUTTON
RenderHandler::StartDragging: I am returning true.
CefDragHandlerImpl::OnDragEnter: I am returning false. I can see dragData->IsReadOnly() is true. Is that ok?
I have below observation on different sites.
1] When I try it with gmail, after SendMouseMoveEvent(const CefMouseEvent& event, bool mouseLeave), mouseLeave as false, I receive OnCursorChange with type 45, But I see crash at same time, below is log snippet.
- Code: Select all
X Error of failed request: BadValue (integer parameter out of range for operation)
Major opcode of failed request: 53 (X_CreatePixmap)
Value in failed request: 0x0
Serial number of failed request: 189
Current serial number in output stream: 196
[0703/143124.843353:FATAL:context.cc(58)] Check failed: !g_context. CefShutdown was not called
Trace/breakpoint trap (core dumped)
I believe cursor type 3 should be received for "Move x conversations" But 45 is being sent. Which
If I change SendMouseMoveEvent(const CefMouseEvent& event, bool mouseLeave), mouseLeave to true I do not see crash
2] When I try it with yahoo mail or outlook, I do not see drag drop working, can't even see mouse cursor change to no drag or mouse cursor with drag data.
Did I miss any function call?
3] With my current implementation, I can see https://developer.mozilla.org/en-US/doc ... drag_event this example is working.
But with this also, I do not see cursor change while we move mouse and drag contents are not moving with mouse move.
Please let me know, if I am missing anything, to implement drag drop functionality using cef API's.
Listing all questions here once
1] dragData , can it be readOnly or it should not be?
2] SendMouseMoveEvent, if mouseLeave is false why does it crash in case of Gmail?
3] Why I do not see dragData with cursor wile in dragMotion and also cursor change is not seen to CT_NODROP, CT_MOVE etc.
4] What is cursor type 45? We have cursor type till 43 then how come 45 is sent?
5] Did I miss any API call in my implementation.
-