Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Partially undo commits #99186e5 and #89d938d and use less-intrusive, …
…JUCE-internal fix for OpenGLContext detach crash Fixes #88
- Loading branch information
Showing
5 changed files
with
33 additions
and
19 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -58,6 +58,10 @@ static NSRect flippedScreenRect (NSRect r) noexcept | |
return r; | ||
} | ||
|
||
#if JUCE_MODULE_AVAILABLE_juce_opengl | ||
void componentPeerAboutToBeRemovedFromScreen (ComponentPeer&); | ||
#endif | ||
|
||
//============================================================================== | ||
class NSViewComponentPeer : public ComponentPeer, | ||
private AsyncUpdater | ||
|
@@ -674,8 +678,12 @@ void redirectMagnify (NSEvent* ev) | |
|
||
void redirectWillMoveToWindow (NSWindow* newWindow) | ||
{ | ||
#if JUCE_MODULE_AVAILABLE_juce_opengl | ||
if ([view window] == window && newWindow == nullptr) | ||
getComponent().removeFromDesktop(); | ||
componentPeerAboutToBeRemovedFromScreen (*this); | ||
This comment has been minimized.
Sorry, something went wrong.
This comment has been minimized.
Sorry, something went wrong.
yairchu
|
||
#else | ||
ignoreUnused (newWindow); | ||
#endif | ||
} | ||
|
||
void sendMouseEvent (NSEvent* ev) | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
In Steinberg Wavelab 7.2.1 this happens when the component is first opened, and causes the OpenGL context to detach.
When later the component is moved to a window nothing causes it to reattach - so this causes OpenGL to simply not work in plugins in Wavelab in OS X..