keep key view loops established in interface builder

This commit is contained in:
Ross Boucher committed 2009-05-08 14:37:31 -07:00
1 parent 1497944eff
commit 2825560c1f
1 file changed
+17
+17
View File
@@ -439,6 +439,8 @@ CPTexturedBackgroundWindowMask
{
if (_initialFirstResponder)
[self makeFirstResponder:_initialFirstResponder];
_keyViewLoopIsDirty = ![self _hasKeyViewLoop];
}
- (void)_setWindowView:(CPView)aWindowView
@@ -1731,6 +1733,21 @@ CPTexturedBackgroundWindowMask
_keyViewLoopIsDirty = YES;
}
- (BOOL)_hasKeyViewLoop
{
var subviews = [];
[self _appendSubviewsOf:_contentView toArray:subviews];
for (var i = 0, count = [subviews count]; i<count; i++)
{
if (subviews[i]._nextKeyView)
return YES;
}
return NO;
}
- (void)recalculateKeyViewLoop
{
var subviews = [];