From 6bd9a084606e860e42e7ad4622acc632f1dadc40 Mon Sep 17 00:00:00 2001 From: Antoine Mercadal Date: Fri, 26 Apr 2013 10:34:48 -0700 Subject: [PATCH] Fixed: CPAlert always shows on main platform window Previously, a CPAlert was always shown on the main platform window. This behavior could result in a feeling that the application was hanging because of the modal nature of the alert when users are looking to another platform window. This fix ensure to set the CPAlert window's platformWindow to the current key window using [[CPApp keyWindow] platformWindow]. --- AppKit/CPAlert.j | 1 + 1 file changed, 1 insertion(+) diff --git a/AppKit/CPAlert.j b/AppKit/CPAlert.j index 4df69bc0e..37208a12e 100644 --- a/AppKit/CPAlert.j +++ b/AppKit/CPAlert.j @@ -642,6 +642,7 @@ var bottomHeight = 71; _window = [[CPPanel alloc] initWithContentRect:frame styleMask:forceStyle || _defaultWindowStyle]; [_window setLevel:CPStatusWindowLevel]; + [_window setPlatformWindow:[[CPApp keyWindow] platformWindow]]; if (_title) [_window setTitle:_title];