]> khamidou — GitHub mirrors - electron.git/commitdiff
Revert #2879
authorCheng Zhao <zcbenz@gmail.com>
Thu, 1 Oct 2015 09:46:11 +0000 (17:46 +0800)
committerCheng Zhao <zcbenz@gmail.com>
Thu, 1 Oct 2015 09:46:11 +0000 (17:46 +0800)
atom/browser/native_window.cc
atom/browser/native_window_mac.mm
atom/browser/native_window_views.cc

index b3ac71d210cfd4c6619d8036d139d5e6ea529fb7..80a7d1347f3e52a64353111bad9368c2f736cbc3 100644 (file)
@@ -158,13 +158,8 @@ 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) {
index f0a685e4d952ef98ebb9f5f8b9a68ef8c9407391..3e8dab2133c9872856aa8b54e4b3baec1a9edab6 100644 (file)
@@ -470,8 +470,6 @@ bool NativeWindowMac::IsFocused() {
 }
 
 void NativeWindowMac::Show() {
-  web_contents()->WasShown();
-
   // This method is supposed to put focus on window, however if the app does not
   // have focus then "makeKeyAndOrderFront" will only show the window.
   [NSApp activateIgnoringOtherApps:YES];
@@ -480,13 +478,11 @@ void NativeWindowMac::Show() {
 }
 
 void NativeWindowMac::ShowInactive() {
-  web_contents()->WasShown();
   [window_ orderFrontRegardless];
 }
 
 void NativeWindowMac::Hide() {
   [window_ orderOut:nil];
-  web_contents()->WasHidden();
 }
 
 bool NativeWindowMac::IsVisible() {
index 0fa2a99c27fc7500377aa294fd275b3202ba0fc2..e9db97e195d15ab43ece6c56347f180ee7a2ef1d 100644 (file)
@@ -343,17 +343,14 @@ bool NativeWindowViews::IsFocused() {
 }
 
 void NativeWindowViews::Show() {
-  web_contents()->WasShown();
   window_->native_widget_private()->ShowWithWindowState(GetRestoredState());
 }
 
 void NativeWindowViews::ShowInactive() {
-  web_contents()->WasShown();
   window_->ShowInactive();
 }
 
 void NativeWindowViews::Hide() {
-  window_->Hide();
   web_contents()->WasHidden();
 }