CEF views and CreateBrowserSync
Posted: Sat Mar 25, 2017 4:47 am
I am trying to integrate CEF views with my existing code. I have a hello world example in cefpython that doesn't depend on any third party GUI framework and calls CefWindowInfo.SetAsChild(0) so that CEF creates a top-level window. However that window has no title, so I wanted to use CEF views to set title. However I can't get it to work, I get a blank window, browser loads fine, but is not shown. Here is my code:
Tried calling SetBounds, Layout and SetToFillLayout without success.
I see that there is CefBrowserView::CreateBrowserView() method, however it creates browser asynchronously and I want to integrate with existing code that expects synchronous browser creation.
Update:
I printed CefBrowser window handle and then executed:
And then I see browser just fine.
CEF branch 2924.
OS: Ubuntu 14.04
- Code: Select all
cef_window = CefWindow::CreateTopLevelWindow()
window_info->SetAsChild(cef_window->GetWindowHandle())
Tried calling SetBounds, Layout and SetToFillLayout without success.
I see that there is CefBrowserView::CreateBrowserView() method, however it creates browser asynchronously and I want to integrate with existing code that expects synchronous browser creation.
Update:
I printed CefBrowser window handle and then executed:
- Code: Select all
xdotool windowraise 65011770
And then I see browser just fine.
CEF branch 2924.
OS: Ubuntu 14.04