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].
This commit is contained in:
Antoine Mercadal committed 2013-04-26 10:34:48 -07:00
1 parent 81a61c1412
commit 6bd9a08460
1 file changed
+1
+1
View File
@@ -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];