Browse Source
Merge branch 'master' into fixes/TextLineCaretNavigation
pull/4339/head
danwalmsley
6 years ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with
20 additions and
17 deletions
-
src/Avalonia.Native/AvaloniaNativeMenuExporter.cs
|
|
|
@ -74,31 +74,34 @@ namespace Avalonia.Native |
|
|
|
return result; |
|
|
|
} |
|
|
|
|
|
|
|
void DoLayoutReset() |
|
|
|
private void DoLayoutReset() |
|
|
|
{ |
|
|
|
_resetQueued = false; |
|
|
|
|
|
|
|
if (_nativeWindow is null) |
|
|
|
if (_resetQueued) |
|
|
|
{ |
|
|
|
var appMenu = NativeMenu.GetMenu(Application.Current); |
|
|
|
_resetQueued = false; |
|
|
|
|
|
|
|
if (appMenu == null) |
|
|
|
if (_nativeWindow is null) |
|
|
|
{ |
|
|
|
appMenu = CreateDefaultAppMenu(); |
|
|
|
NativeMenu.SetMenu(Application.Current, appMenu); |
|
|
|
} |
|
|
|
var appMenu = NativeMenu.GetMenu(Application.Current); |
|
|
|
|
|
|
|
SetMenu(appMenu); |
|
|
|
} |
|
|
|
else |
|
|
|
{ |
|
|
|
if (_menu != null) |
|
|
|
if (appMenu == null) |
|
|
|
{ |
|
|
|
appMenu = CreateDefaultAppMenu(); |
|
|
|
NativeMenu.SetMenu(Application.Current, appMenu); |
|
|
|
} |
|
|
|
|
|
|
|
SetMenu(appMenu); |
|
|
|
} |
|
|
|
else |
|
|
|
{ |
|
|
|
SetMenu(_nativeWindow, _menu); |
|
|
|
if (_menu != null) |
|
|
|
{ |
|
|
|
SetMenu(_nativeWindow, _menu); |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
_exported = true; |
|
|
|
_exported = true; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
internal void QueueReset() |
|
|
|
|