mirror of
https://github.com/juce-framework/JUCE.git
synced 2026-01-09 23:34:20 +00:00
AU Client: Fix calling makeFirstResponder for nil window in Ableton Live
When pressing the Escape key the call to hostView keyDown: closes the plugin window and the subsequent [hostView window] returns nil.
This commit is contained in:
parent
8c1ff91aa3
commit
4deee6976b
1 changed files with 5 additions and 3 deletions
|
|
@ -1749,11 +1749,13 @@ public:
|
|||
|
||||
auto* view = (NSView*) getWindowHandle();
|
||||
auto* hostView = [view superview];
|
||||
auto* hostWindow = [hostView window];
|
||||
|
||||
[hostWindow makeFirstResponder: hostView];
|
||||
[[hostView window] makeFirstResponder: hostView];
|
||||
[hostView keyDown: currentEvent];
|
||||
[hostWindow makeFirstResponder: view];
|
||||
|
||||
if ((hostView = [view superview]))
|
||||
if (auto* hostWindow = [hostView window])
|
||||
[hostWindow makeFirstResponder: view];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue