diff --git a/atom/browser/native_window_mac.mm b/atom/browser/native_window_mac.mm index b7e71f749ec0..8dd6457f87fb 100644 --- a/atom/browser/native_window_mac.mm +++ b/atom/browser/native_window_mac.mm @@ -604,6 +604,10 @@ void NativeWindowMac::Close() { } void NativeWindowMac::CloseImmediately() { + // Close all child windows before closing this window. + for (NSWindow* child in [window_ childWindows]) + [child close]; + [window_ close]; }