Fixed: popovers could only properly open relative to views in the main window.

This would make the popover open with the wrong coordinates if the positioning view was in a window different than the main window, such as a utility window which can't become the main window.
This commit is contained in:
Alexander Ljungberg
2012-08-28 16:25:41 +01:00
parent 5b19c967f4
commit b33763caeb
+2 -3
View File
@@ -109,8 +109,7 @@ var _CPAttachedWindow_attachedWindowShouldClose_ = 1 << 0,
*/
- (id)initWithContentRect:(CGRect)aFrame
{
self = [self initWithContentRect:aFrame styleMask:0];
return self;
return [self initWithContentRect:aFrame styleMask:0];
}
/*!
@@ -196,7 +195,7 @@ var _CPAttachedWindow_attachedWindowShouldClose_ = 1 << 0,
- (CGPoint)computeOriginFromRect:(CGRect)aRect ofView:(CPView)positioningView preferredEdge:(int)anEdge
{
var mainWindow = [CPApp mainWindow],
var mainWindow = [positioningView window],
platformWindow = [mainWindow platformWindow],
nativeRect = [platformWindow nativeContentRect],
baseOrigin = [positioningView convertPointToBase:aRect.origin],