[Lazarus] fpCEF3 questions

Torsten Bonde Christiansen tc at epidata.info
Thu Sep 14 13:50:19 CEST 2017


On 2017-09-14 13:10, dev.dliw at gmail.com wrote:
> 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
> Linux?
Absolutely correct. I'm using the currently available 3.3029 on Linux 
(64bit) GTK2

>> 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...
Okay - thanks.

>> 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:
> https://bitbucket.org/chromiumembedded/cef/issues/2026/multiple-major-keyboard-focus-issues-on
>
> 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.
In my project i create an HTML output for a statistical analysis program 
and the code itself is very simple - tables and paragraph, and only very 
little CSS.

>> 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?

Without Main menu:




With main menu:
  - notice the lacking tabs, this is more prominent if not using a 
pagecontrol, but
    any other wincontrol to host the browser.
> 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
> issues:
> https://bitbucket.org/chromiumembedded/cef/issues/1417/linux-improve-cef-x11-window-behavior-in
>
>
> The more robust solution on Linux ATM is the offscreen browser TChromiumOSR.
In the OSR example the painting is tied to OpenGL IIRC, but can it be 
tied to something else? and how?


Another issue with all the versions of CEF i have tried so far is that I 
get a SIGSEGV when closing any application that uses fpCEF. I have tried 
many combinations when trying to shutdown, but it seems to boil down to 
calling "CefCloseLibrary" that causes the SIGSEGV.

Regards,
Torsten.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.lazarus-ide.org/pipermail/lazarus/attachments/20170914/7401765c/attachment-0001.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: imiclgppjonjndfh.png
Type: image/png
Size: 26534 bytes
Desc: not available
URL: <http://lists.lazarus-ide.org/pipermail/lazarus/attachments/20170914/7401765c/attachment-0002.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: fcofgbfkmbanhfio.png
Type: image/png
Size: 25125 bytes
Desc: not available
URL: <http://lists.lazarus-ide.org/pipermail/lazarus/attachments/20170914/7401765c/attachment-0003.png>


More information about the Lazarus mailing list