browser: hide webcontents when window not shown

This commit is contained in:
Robo 2015-09-22 22:21:49 +05:30
parent 1520ebfe1f
commit 5ca5c4fb92
3 changed files with 30 additions and 1 deletions

View file

@ -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) {