From 92fb9eade5e2b0a6d9fc1988e756d20a63058652 Mon Sep 17 00:00:00 2001 From: Aparajita Fishman Date: Wed, 13 Mar 2013 12:37:46 -0400 Subject: [PATCH] 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. --- AppKit/CPWindow/CPWindow.j | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/AppKit/CPWindow/CPWindow.j b/AppKit/CPWindow/CPWindow.j index 514d30a29..b357852c7 100644 --- a/AppKit/CPWindow/CPWindow.j +++ b/AppKit/CPWindow/CPWindow.j @@ -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]; } /*!