From fb7e7b315cc8c34a285b405c505e6cb94596af6f Mon Sep 17 00:00:00 2001 From: Cheng Zhao Date: Fri, 17 Jun 2016 15:47:05 +0900 Subject: [PATCH] mac: Close all child windows before closing current window --- atom/browser/native_window_mac.mm | 4 ++++ 1 file changed, 4 insertions(+) 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]; }