cefsharp / CefSharp

.NET (WPF and Windows Forms) bindings for the Chromium Embedded Framework
http://cefsharp.github.io/
Other
9.79k stars 2.92k forks source link

WPF - Improve Mouse Click Count #3940

Closed mountrivers closed 2 years ago

mountrivers commented 2 years ago
[1231/124738.468:FATAL:event.cc(601)] Check failed: 3 >= click_count (3 vs.  4)
amaitland commented 2 years ago

What version of the product are you using? Build from branch 4664

Are you using an official release? If so what is the exact version. If you've built a custom version does the problem reproduce with an official release?

Please test with https://github.com/cefsharp/CefSharp.MinimalExample

mountrivers commented 2 years ago

i was using build with debug64. But after I use release64 the problem was solved

amaitland commented 2 years ago

A quick look at the Chromium source and it appears you were hitting the DCHECK at https://source.chromium.org/chromium/chromium/src/+/main:ui/events/event.cc;l=600

The upstream documentation for SendMouseClickEvent doesn't actually mention click_count. Looking at the Chromium source and it would appear that only single, double and triple (1, 2, 3 respectively) are supported.

https://source.chromium.org/chromium/chromium/src/+/main:ui/events/event.h;l=540?q=SetClickCount&sq=&ss=chromium

Whilst it's only a DCHECK and won't ever crash in a release build I've updated to send click count of 1 of greater than 3. Potentially we could make further improvements if a valid use case presents itself.

i was using build with debug64

Debug builds should only be used for actual debugging of Chromium.