chromiumembedded / cef

Chromium Embedded Framework (CEF). A simple framework for embedding Chromium-based browsers in other applications.
https://bitbucket.org/chromiumembedded/cef/
Other
3.39k stars 468 forks source link

With a TChromium component embedded in a Delphi application mousedown and mouse events get handled the wrong way around #568

Closed magreenblatt closed 12 years ago

magreenblatt commented 12 years ago

Original report by Anonymous.


Original issue 568 created by jjsmit74 on 2012-04-04T12:12:59.000Z:

In our Delphi applications we try to embed a browser view. Because of the speed and the great support of browser features I would like to use the Delphi Chromium Embedded component. However, when embedded in our main form in one of the tab sheets the mouse events (down and up) get mixed up and accelerator keys do not work anymore.

What steps will reproduce the problem?

  1. Add a TChromium component to a Delphi form on a TPanel
  2. Add a TButton somewhere else on the form and log OnMouseDown and OnMouseUp events on the button component
  3. Click the button a few times and within a few clicks you will notice that the mouse-up event is triggered before the mouse-down causing the application to think it is dragging something and button clicks not to work.

Unfortunately currently at my work the TortoiseSVN functionality is not working due to some network trouble so I don't know the exact version I have, but I downloaded the main version on November 2 2011.

I debugged the problem using mouse-hooks ("SetWindowsHookEx(WH_MOUSE...)") and noticed that events there were always in the right order. Tracking what happens to the mouse messages led me to code in cefvcl.pas where, using ApplicationEvents, both the "OnIdle" and "OnMessage" are implemented. When you click the mouse, the mouse-down event is the one to trigger "TCefApplicationEvents.doMessage" which will trigger the "CefDoMessageLoopWork". This takes some time and this is long enough for the mouse-up event to catch up and overtake the mouse down event.

Please find two attachments:

We've been able to reproduce the issue on Windows 7, Vista and XP. We are using Embarcadero Delphi 2010 to develop our apps.

I hope you can help me out and confirm the issue or provide me with an alternative solution.

Best regards,
Jeroen

magreenblatt commented 12 years ago

Comment 1. originally posted by magreenblatt on 2012-04-04T17:43:07.000Z:

The Delphi wrapper is a separate project. Please file Delphi-related bugs with them.

magreenblatt commented 12 years ago