Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

work around a bug in 10.6 with mixing layer-backed and layer-hosting …

…view hierarchies
  • Loading branch information...
commit d476dae2cd9e77790422150b1ee6e30bc3c8bb1b 1 parent f7b702c
@joshaber joshaber authored
Showing with 4 additions and 0 deletions.
  1. +4 −0 lib/UIKit/TUINSView.m
View
4 lib/UIKit/TUINSView.m
@@ -262,6 +262,8 @@ - (void)viewWillMoveToWindow:(NSWindow *)newWindow {
[[NSNotificationCenter defaultCenter] removeObserver:self name:NSWindowDidChangeScreenProfileNotification object:self.window];
}
+ [self.tuiHostView removeFromSuperview];
+
CALayer *hostLayer = self.tuiHostView.layer;
if(newWindow != nil && _rootView.layer.superlayer != hostLayer) {
_rootView.layer.frame = hostLayer.bounds;
@@ -289,6 +291,8 @@ - (void)viewDidMoveToWindow
[self.window setDisplaysWhenScreenProfileChanges:YES];
[[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(screenProfileOrBackingPropertiesDidChange:) name:NSWindowDidChangeScreenProfileNotification object:self.window];
}
+
+ [self addSubview:self.tuiHostView positioned:NSWindowBelow relativeTo:self.appKitHostView];
}
- (void)_updateLayerScaleFactor {
Please sign in to comment.
Something went wrong with that request. Please try again.