Browse Source
Merge pull request #10431 from AvaloniaUI/fixes/osx-menu-reparenting-crash
if the window is closed, we cannot become the key window.
pull/10462/head
Steven Kirk
3 years ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with
1 additions and
1 deletions
-
native/Avalonia.Native/src/OSX/AvnWindow.mm
|
|
|
@ -238,7 +238,7 @@ |
|
|
|
|
|
|
|
-(BOOL)canBecomeKeyWindow |
|
|
|
{ |
|
|
|
if(_canBecomeKeyWindow) |
|
|
|
if(_canBecomeKeyWindow && !_closed) |
|
|
|
{ |
|
|
|
// If the window has a child window being shown as a dialog then don't allow it to become the key window. |
|
|
|
auto parent = dynamic_cast<WindowImpl*>(_parent.getRaw()); |
|
|
|
|