browser: hide webcontents when window not shown
This commit is contained in:
parent
1520ebfe1f
commit
5ca5c4fb92
3 changed files with 30 additions and 1 deletions
|
@ -159,8 +159,13 @@ void NativeWindow::InitFromOptions(const mate::Dictionary& options) {
|
|||
// Then show it.
|
||||
bool show = true;
|
||||
options.Get(switches::kShow, &show);
|
||||
if (show)
|
||||
if (show) {
|
||||
Show();
|
||||
} else {
|
||||
// When RenderView is created it sets to visible, this is to prevent
|
||||
// breaking the visibility API.
|
||||
web_contents()->WasHidden();
|
||||
}
|
||||
}
|
||||
|
||||
void NativeWindow::SetSize(const gfx::Size& size) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue