Fixed: if a sheet's parent window frame was changed, the sheet did not reposition

Previously, sheets were only repositioned if the parent window's setFrameOrigin: method was called. This did not cover all possible cases for parent window repositioning.

Now the sheet is repositioned any time the parent window's origin changes.
This commit is contained in:
Aparajita Fishman committed 2013-03-13 12:37:46 -04:00
1 parent 2f4b0f8563
commit 92fb9eade5
1 file changed
+4 -4
+4 -4
View File
@@ -703,6 +703,10 @@ CPTexturedBackgroundWindowMask
}
#endif
// reposition sheet
if ([self attachedSheet])
[self _setAttachedSheetFrameOrigin];
[[CPNotificationCenter defaultCenter] postNotificationName:CPWindowDidMoveNotification object:self];
}
@@ -843,10 +847,6 @@ CPTexturedBackgroundWindowMask
{
var frame = [self _constrainOriginOfFrame:CGRectMake(anOrigin.x, anOrigin.y, _frame.size.width, _frame.size.height)];
[self _setFrame:frame display:YES animate:NO constrainWidth:NO constrainHeight:NO];
// reposition sheet
if ([self attachedSheet])
[self _setAttachedSheetFrameOrigin];
}
/*!