cef icon indicating copy to clipboard operation
cef copied to clipboard

Overlay browser view not shown when using CefWindow::AddOverlayView

Open Taronyu opened this issue 5 months ago • 1 comments

Describe the bug We use AddOverlayView with browser views to embed a browser view on top of our main browser. Starting from CEF 125 this was broken due to a crash (issue #3784) which got fixed thankfully. However, now the browser view is not shown anymore. In our application I see that the browser instance is null. According to the documentation the browser is only created once the view is added to the view hierarchy, but as far as I understood this should happen when CefWindow::AddOverlayView is called.

I did not see anything obviously wrong with the calling code. I compared it to other elements of cefclient and cefsimple that are added via AddOverlayView. I suspect that the browser instance is not created, given that CefBrowserView::GetBrowser returns nullptr.

To Reproduce Steps to reproduce the behavior:

  1. Apply provided patch file to cefclient
  2. Build cefclient
  3. Launch cefclient with --use-views --hide-frame --hide-controls
  4. Only the main website is shown, not the overlay view pointing to https://bitbucket.org/chromiumembedded/cef/

Expected behavior Browser view is created and shown in parent window on top of its content.

Screenshots N/A

Versions (please complete the following information):

  • OS: Windows 11
  • CEF Version: master (build tag 129.0.0-master.3051+g6459917+chromium-129.0.6668.0)

Additional context With the provided patch for cefclient it is possible to reproduce the issue. cefclient_testcode.patch

Taronyu avatar Sep 18 '24 12:09 Taronyu