I found that the ComponentBoundsConstrainer doesn’t always work. I have a custom subclass of ComponentBoundsConstrainer and the checkBounds() method is not always called with the proper values for the isStretching* parameters. The problem is because these are set by comparing changes to the window bounds only the first time that NSViewComponentPeer::constrainRect() is called. So, if you click on the bottom/right corner of the window but happen to only size the width on the first mouse drag then the isStretchingBottom will never be true for the duration.
A potential fix that seems to work for me is to change this line as follows in NSViewComponentPeer::constrainRect:
- if (! inLiveResize || isFirstLiveResize)
+ if (true || ! inLiveResize || isFirstLiveResize)
However, perhaps there would be a bad side effect of making this always calculate which side is being changed? If so then maybe there is a more appropriate fix.
Thanks for taking a look!