Fixed: canBecomeKeyWindow response for auxiliary windows.

Without this fix Cappuccino always returned YES for `canBecomeKeyWindow` for every window. But in Cocoa, only "standard" windows with a title bar and/or resizing return YES.

With this fix Cappuccino better matches Cocoa's behaviour.
This commit is contained in:
Alexander Ljungberg
2012-11-26 14:01:33 +00:00
parent 2236e7d2da
commit ce9534cdea
+3 -1
View File
@@ -1856,7 +1856,9 @@ CPTexturedBackgroundWindowMask
*/
- (BOOL)canBecomeKeyWindow
{
return YES;
// In Cocoa only resizable or titled windows return YES here by default. But the main browser window in Cappuccino
// doesn't have these masks even that it's both titled and resizable, so we return YES when isFullPlatformWindow too.
return (_styleMask & CPResizableWindowMask) || (_styleMask & CPResizableWindowMask) || [self isFullPlatformWindow];
}
/*!