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?
Add a TChromium component to a Delphi form on a TPanel
Add a TButton somewhere else on the form and log OnMouseDown and OnMouseUp events on the button component
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:
one with my simple test project
one with the adjustment to cefvcl.pas I propose as a solution which doesn't directly call "CefDoMessageLoopWork" but does this async allowing for messages to get handled right away.
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.
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?
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