From 5556c4324254374b042be231df2334e0f7b1980f Mon Sep 17 00:00:00 2001 From: "gtm.daemon" Date: Mon, 17 Sep 2012 21:00:16 +0000 Subject: [Author: thomasvl] Properly support top level parent view. http://code.google.com/p/google-toolbox-for-mac/issues/detail?id=86 R=sail DELTA=2 (0 added, 1 deleted, 1 changed) --- AppKit/GTMWindowSheetController.m | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/AppKit/GTMWindowSheetController.m b/AppKit/GTMWindowSheetController.m index 92e2526..7cfeaeb 100644 --- a/AppKit/GTMWindowSheetController.m +++ b/AppKit/GTMWindowSheetController.m @@ -134,7 +134,7 @@ willPositionSheet:(NSWindow*)sheet _GTMDevAssert([sheets_ count] == 0, @"Finalizing a controller with sheets still active!"); [[NSNotificationCenter defaultCenter] removeObserver:self]; - + [super finalize]; } @@ -460,7 +460,7 @@ willPositionSheet:(NSWindow*)sheet return &kGTMWSCSystemSheetInfoData[i]; } } - + _GTMDevLog(@"Failed to find info for sheet of type %@", [systemSheet class]); return nil; } @@ -488,8 +488,7 @@ willPositionSheet:(NSWindow*)sheet } - (NSRect)screenFrameOfView:(NSView*)view { - NSRect viewFrame = [view frame]; - viewFrame = [[view superview] convertRect:viewFrame toView:nil]; + NSRect viewFrame = [view convertRect:[view bounds] toView:nil]; viewFrame.origin = [[view window] convertBaseToScreen:viewFrame.origin]; return viewFrame; } -- cgit v1.2.3