mirror of
https://github.com/juce-framework/JUCE.git
synced 2026-01-10 23:44:24 +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,10 +1749,12 @@ public:
|
||||||
|
|
||||||
auto* view = (NSView*) getWindowHandle();
|
auto* view = (NSView*) getWindowHandle();
|
||||||
auto* hostView = [view superview];
|
auto* hostView = [view superview];
|
||||||
auto* hostWindow = [hostView window];
|
|
||||||
|
|
||||||
[hostWindow makeFirstResponder: hostView];
|
[[hostView window] makeFirstResponder: hostView];
|
||||||
[hostView keyDown: currentEvent];
|
[hostView keyDown: currentEvent];
|
||||||
|
|
||||||
|
if ((hostView = [view superview]))
|
||||||
|
if (auto* hostWindow = [hostView window])
|
||||||
[hostWindow makeFirstResponder: view];
|
[hostWindow makeFirstResponder: view];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue