[Lazarus] fpCEF3 questions

dev.dliw at gmail.com dev.dliw at gmail.com
Thu Sep 14 13:10:10 CEST 2017

Hi Torsten,

>working with the framework is causing headaches
being the author of fpCEF, I can confirm that ;)

Is it correct, that you are using one of the latest versions of fpCEF on 

> 1) I need to hook into the scrollbars such that i manually can position
> the view.
There is no API for that, but you can write JavaScript to do the job.
See the JavaScript example...

> 2) Parts of the focus handling seems to be either broken or my
> understanding of it is broken.
If you are on Linux, this is a known problem (for me; I need create an issue 
on Github).

I myself use fpCEF for showing html pages (no interaction), so I only realized 
it was broken, when doing the latest update.

The problem seems to be within CEF:

For GTK I think I found a way to work around the problem in fpCEF, but QT is 
totally broken.
I'm trying to improve the current situation, but it will take some time.

> 3) Using the TChromium component does not paint the view correctly when
> a main menu is used. There seems to be an offset problem.
Could you send a screenshot?

On Linux there are many ways to break TChromium. The reason is the way how CEF 
is embedded into LCL. Currently CEF always is embedded directly into the 
XWindow of the Form and positioned / resized via X events.
For simple use cases it usually works ok, but can break easily for more 
complex setups (like the tabbed browser).

I already tried to embed CEF into the XWindow of the parent control of 
TChromium, but then event handling breaks for CEF and the client LCL 
application, if the parent is not a form.

CEF at the moment also does not support Xembed, which IMO could solve many 

The more robust solution on Linux ATM is the offscreen browser TChromiumOSR.

Btw. I would be very happy if anyone could tell me, how to reliably embed a 
XWindow into any LCL widgetset on Linux.

Kind regards,

More information about the Lazarus mailing list