Permalink
Browse files

Don't clip NSViews to some scroll view if the TUINSView itself is wit…

…hin it
  • Loading branch information...
jspahrsummers committed Jul 23, 2012
1 parent 816df19 commit 5c7511d59a1e27bc90aac2fc003c460dc53b5c2f
Showing with 5 additions and 2 deletions.
  1. +5 −2 lib/UIKit/TUINSView.m
View
@@ -704,10 +704,13 @@ - (NSView *)hitTest:(NSPoint)point {
}
- (void)recalculateNSViewOrdering; {
+ NSAssert([NSThread isMainThread], @"");
[self.appKitHostView sortSubviewsUsingFunction:&compareNSViewOrdering context:NULL];
}
- (void)recalculateNSViewClipping; {
+ NSAssert([NSThread isMainThread], @"");
+
#if !ENABLE_NSVIEW_CLIPPING
return;
#endif
@@ -721,9 +724,9 @@ - (void)recalculateNSViewClipping; {
CALayer *focusRingLayer = [self focusRingLayerForView:view];
if (focusRingLayer) {
- id<TUIBridgedScrollView> clippingView = [hostView ancestorScrollView];
+ id<TUIBridgedScrollView> clippingView = hostView.ancestorScrollView;
- if (clippingView) {
+ if (clippingView && self.ancestorScrollView != clippingView) {
// set up a mask on the focus ring that clips to any ancestor scroll views
CAShapeLayer *maskLayer = (id)focusRingLayer.mask;
if (![maskLayer isKindOfClass:[CAShapeLayer class]]) {

0 comments on commit 5c7511d

Please sign in to comment.