macos: only invalidate tiles when size changes

If the size changes, we need to relayout the tiles. Otherwise we can keep
using what we had before. Generally, that shouldn't happen, but the
previous check was failing in a number of ways.
This commit is contained in:
Christian Hergert 2022-02-22 00:51:53 -08:00
parent 42164fa8bb
commit df8e2bc0a0

View File

@ -317,13 +317,14 @@ fromCGRect (const CGRect rect)
-(void)setFrame:(NSRect)frame
{
if (CGRectEqualToRect (frame, self.frame))
return;
self->_layoutInvalid = TRUE;
if (frame.size.width != self.bounds.size.width ||
frame.size.height != self.bounds.size.height)
{
self->_layoutInvalid = TRUE;
[self setNeedsLayout];
}
[super setFrame:frame];
[self setNeedsLayout];
}
-(void)setOpaqueRegion:(const cairo_region_t *)opaqueRegion