- Code: Select all
// in root_window_mac.mm
// after
/*
if (!is_popup_) {
// Create the browser window.
browser_window_->CreateBrowser(
...
*/
NSScrollView* browser_view = (NSScrollView*)CAST_CEF_WINDOW_HANDLE_TO_NSVIEW(GetWindowHandle());
[browser_view removeFromSuperview];
browser_view.automaticallyAdjustsContentInsets = YES;
[window_ setContentView:browser_view];
// followed by
/*
if (!initially_hidden) {
// Show the window.
Show(RootWindow::ShowNormal);
..
*/
Without `browser_view.automaticallyAdjustsContentInsets = YES;`,the window pops up fine without error.
Please help me about how to achieve this? Many thanks~