Skip to content

Commit

Permalink
iOS: Remove didAddSubview override in NSWindow, its code breaks thing…
Browse files Browse the repository at this point in the history
…s which rely on focus changing within SDL's UIWindow (bug #4659).
  • Loading branch information
slime73 committed Jun 12, 2019
1 parent 2fa33d6 commit 74e86a5
Showing 1 changed file with 0 additions and 14 deletions.
14 changes: 0 additions & 14 deletions src/video/uikit/SDL_uikitwindow.m
Expand Up @@ -67,20 +67,6 @@ - (void)layoutSubviews;

@implementation SDL_uikitwindow

- (void)didAddSubview:(UIView *)subview
{
[super didAddSubview:subview];
// We need to pach the enabled state in subviews as a Metal view gets added and covers up the SDL_uikitview that handles touch.
// So set needs layout so that the layout gets done (which is where we patch the flags) Johna.
NSArray<UIView*>* subviews = self.subviews;
for (int i=0; i<[subviews count]; i++)
{
UIView *view = [subviews objectAtIndex:i];
// NSLog( @"View %p enabled %d\n", view, view.userInteractionEnabled );
[view setNeedsLayout]; // force the subviews to layout.
}
}

- (void)layoutSubviews
{
/* Workaround to fix window orientation issues in iOS 8+. */
Expand Down

0 comments on commit 74e86a5

Please sign in to comment.