Prevent recursive notification sequence

git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/branches/gnustep_testplant_branch@35617 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
Marcian Lytwyn 2012-09-28 20:41:14 +00:00
parent e80b42db50
commit 9e04422b24
2 changed files with 10 additions and 3 deletions

View file

@ -141,6 +141,7 @@ PACKAGE_SCOPE
BOOL _is_rotated_from_base;
BOOL _is_rotated_or_scaled_from_base;
BOOL _post_frame_changes;
BOOL _posting_frame_changes;
BOOL _post_bounds_changes;
BOOL _autoresizes_subviews;
BOOL _coordinates_valid;

View file

@ -1223,10 +1223,12 @@ static NSSize _computeScale(NSSize fs, NSSize bs)
}
[self resetCursorRects];
[self resizeSubviewsWithOldSize: old_size];
if (_post_frame_changes)
if (_post_frame_changes && (_posting_frame_changes == NO))
{
_posting_frame_changes = YES;
[nc postNotificationName: NSViewFrameDidChangeNotification
object: self];
_posting_frame_changes = NO;
}
}
}
@ -1244,10 +1246,12 @@ static NSSize _computeScale(NSSize fs, NSSize bs)
}
[self _setFrameAndClearAutoresizingError: newFrame];
[self resetCursorRects];
if (_post_frame_changes)
if (_post_frame_changes && (_posting_frame_changes == NO))
{
_posting_frame_changes = YES;
[nc postNotificationName: NSViewFrameDidChangeNotification
object: self];
_posting_frame_changes = NO;
}
}
}
@ -1309,10 +1313,12 @@ static NSSize _computeScale(NSSize fs, NSSize bs)
}
[self resetCursorRects];
[self resizeSubviewsWithOldSize: old_size];
if (_post_frame_changes)
if (_post_frame_changes && (_posting_frame_changes == NO))
{
_posting_frame_changes = YES;
[nc postNotificationName: NSViewFrameDidChangeNotification
object: self];
_posting_frame_changes = NO;
}
}
}