aboutsummaryrefslogtreecommitdiff
path: root/AppKit
diff options
context:
space:
mode:
authorGravatar gtm.daemon <gtm.daemon@7dc7ac4e-7543-0410-b95c-c1676fc8e2a3>2012-09-17 21:00:16 +0000
committerGravatar gtm.daemon <gtm.daemon@7dc7ac4e-7543-0410-b95c-c1676fc8e2a3>2012-09-17 21:00:16 +0000
commit5556c4324254374b042be231df2334e0f7b1980f (patch)
tree918b1294c6e08a24c905c015b81f516914c80955 /AppKit
parent3b079d8c56bfe47f35e074a2f390b354e805ef3d (diff)
[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)
Diffstat (limited to 'AppKit')
-rw-r--r--AppKit/GTMWindowSheetController.m7
1 files 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;
}