Drag Drop Observations and crash when cursor type 45

Having problems with building or using CEF's C/C++ APIs? This forum is here to help. Please do not post bug reports or feature requests here.

Drag Drop Observations and crash when cursor type 45

Postby ajitchavan » Fri Jul 03, 2020 7:09 am

Hi ,

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.
-
Last edited by ajitchavan on Mon Jul 06, 2020 6:11 am, edited 2 times in total.
ajitchavan
Techie
 
Posts: 27
Joined: Mon Mar 16, 2020 7:03 am

Re: Drag Drop Observations and crash when cursor type 45

Postby magreenblatt » Fri Jul 03, 2020 10:43 am

What OS and CEF version? How does it behave in the cefclient sample application when running with the `--off-screen-rendering-enabled` command-line switch?
magreenblatt
Site Admin
 
Posts: 12382
Joined: Fri May 29, 2009 6:57 pm

Re: Drag Drop Observations and crash when cursor type 45

Postby vmas » Fri Jul 03, 2020 11:04 am

The cursor type 45 is CT_CUSTOM (since Chromium 3945). Was fixed in CEF 83.
Maintainer of the CefNet project.
vmas
Techie
 
Posts: 13
Joined: Mon Feb 24, 2020 4:03 am

Re: Drag Drop Observations and crash when cursor type 45

Postby ajitchavan » Sun Jul 05, 2020 10:27 pm

magreenblatt wrote:What OS and CEF version? How does it behave in the cefclient sample application when running with the `--off-screen-rendering-enabled` command-line switch?


I am using windows 10 to browse but server is on Ubuntu 16.04.6 LTS and cef 79.0.0-master.2153+gfecd582+chromium-79.0.3945.130
Last edited by ajitchavan on Mon Jul 06, 2020 4:28 am, edited 1 time in total.
ajitchavan
Techie
 
Posts: 27
Joined: Mon Mar 16, 2020 7:03 am

Re: Drag Drop Observations and crash when cursor type 45

Postby amaitland » Sun Jul 05, 2020 11:11 pm

You need to upgrade to version 83.
Maintainer of the CefSharp project.
amaitland
Virtuoso
 
Posts: 1290
Joined: Wed Jan 14, 2015 2:35 am

Re: Drag Drop Observations and crash when cursor type 45

Postby ajitchavan » Mon Jul 06, 2020 4:32 am

amaitland wrote:You need to upgrade to version 83.


I tried with "83.3.12+g0889ff0+chromium-83.0.4103.97" today and still have same issues.

If dragData isReadOnly:true, then drag drop will work?
ajitchavan
Techie
 
Posts: 27
Joined: Mon Mar 16, 2020 7:03 am

Re: Drag Drop Observations and crash when cursor type 45

Postby ajitchavan » Fri Jul 17, 2020 7:12 am

When I debug further, I found that custom_cursor_info from render_widget_host_view_osr.cc comes invalid.
custom_cursor_info.hotspot.x, custom_cursor_info.hotspot.y, custom_cursor_info.size.width, custom_cursor_info.size.height are coming as 0.
As Height and width are 0, X_CreatePixmap(https://tronche.com/gui/x/xlib/pixmap-a ... ixmap.html) crashed with BadValue.

I tested the same on cef 83 as well.
ajitchavan
Techie
 
Posts: 27
Joined: Mon Mar 16, 2020 7:03 am


Return to Support Forum

Who is online

Users browsing this forum: Google [Bot] and 38 guests