mirror of
https://github.com/juce-framework/JUCE.git
synced 2026-01-10 23:44:24 +00:00
NSViewComponent: Ensure NSView follows size of top-level component
This commit reverts part of f73f8ee84 which introduced an issue when
resizing a subcomponent with an attached OpenGLContext.
More details of the issue can be seen at
https://github.com/juce-framework/JUCE/issues/914.
This commit is contained in:
parent
280d97eb79
commit
6c46512e8b
1 changed files with 11 additions and 0 deletions
|
|
@ -128,6 +128,17 @@ public:
|
|||
[view release];
|
||||
}
|
||||
|
||||
void componentMovedOrResized (Component& comp, bool wasMoved, bool wasResized) override
|
||||
{
|
||||
ComponentMovementWatcher::componentMovedOrResized (comp, wasMoved, wasResized);
|
||||
|
||||
// The ComponentMovementWatcher version of this method avoids calling
|
||||
// us when the top-level comp is resized, but if we're listening to the
|
||||
// top-level comp we still want the NSView to track its size.
|
||||
if (comp.isOnDesktop() && wasResized)
|
||||
componentMovedOrResized (wasMoved, wasResized);
|
||||
}
|
||||
|
||||
void componentMovedOrResized (bool /*wasMoved*/, bool /*wasResized*/) override
|
||||
{
|
||||
if (auto* peer = owner.getTopLevelComponent()->getPeer())
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue