Skip to content
This repository was archived by the owner on May 28, 2025. It is now read-only.
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions Frameworks/UIKit/UIView.mm
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
#import <StubReturn.h>
#import "Starboard.h"

#import <UIKit/UIApplication.h>
#import <UIKit/UIGraphics.h>
#import <UIKit/UIImage.h>
#import <UIKit/UIImageView.h>
Expand All @@ -39,6 +40,7 @@
#import "UIWindowInternal.h"
#import "UIViewControllerInternal.h"
#import "UIGestureRecognizerInternal.h"
#import "CACompositor.h"
#import "CALayerInternal.h"
#import "CAAnimationInternal.h"
#import "CGContextInternal.h"
Expand Down Expand Up @@ -2299,6 +2301,13 @@ - (UIWindow*)_getWindowInternal {
}

if (!priv->superview) {
// This is probably safe to do in all cases, but for now, let's constrain
Copy link
Contributor

@yiyang-msft yiyang-msft Jan 25, 2017

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

probably safe to do in all cas [](start = 18, length = 31)

agreed. #Resolved

// this to middleware scenarios. We need to return a window in such cases
// so point/rect/etc. conversion works properly.
if (GetCACompositor()->IsRunningAsFramework()) {
return [[UIApplication sharedApplication] keyWindow];
}

return nil;
}

Expand Down