Revision: 578
Author: gtm.daemon
Date: Mon Sep 17 14:00:16 2012
Log: [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)
http://code.google.com/p/google-toolbox-for-mac/source/detail?r=578
Modified:
/trunk/AppKit/GTMWindowSheetController.m
=======================================
--- /trunk/AppKit/GTMWindowSheetController.m Thu Apr 14 12:30:15 2011
+++ /trunk/AppKit/GTMWindowSheetController.m Mon Sep 17 14:00:16 2012
@@ -134,7 +134,7 @@
_GTMDevAssert([sheets_ count] == 0,
@"Finalizing a controller with sheets still active!");
[[NSNotificationCenter defaultCenter] removeObserver:self];
-
+
[super finalize];
}
@@ -460,7 +460,7 @@
return &kGTMWSCSystemSheetInfoData[i];
}
}
-
+
_GTMDevLog(@"Failed to find info for sheet of type %@", [systemSheet
class]);
return nil;
}
@@ -488,8 +488,7 @@
}
- (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;
}