Skip to content

Commit

Permalink
keep key view loops established in interface builder
Browse files Browse the repository at this point in the history
  • Loading branch information
Ross Boucher committed May 8, 2009
1 parent 1497944 commit 2825560
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions AppKit/CPWindow/CPWindow.j
Original file line number Diff line number Diff line change
Expand Up @@ -439,6 +439,8 @@ CPTexturedBackgroundWindowMask
{
if (_initialFirstResponder)
[self makeFirstResponder:_initialFirstResponder];

_keyViewLoopIsDirty = ![self _hasKeyViewLoop];
}

- (void)_setWindowView:(CPView)aWindowView
Expand Down Expand Up @@ -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 = [];
Expand Down

0 comments on commit 2825560

Please sign in to comment.