Browse Source
Merge pull request #3870 from AvaloniaUI/feature/osx-dont-let-osx-auto-insert-some-window-items
[OSX] prevent osx from inserting View and Help menu options.
pull/3879/head
danwalmsley
6 years ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with
5 additions and
0 deletions
-
native/Avalonia.Native/src/OSX/app.mm
-
native/Avalonia.Native/src/OSX/window.mm
|
|
|
@ -15,6 +15,10 @@ NSApplicationActivationPolicy AvnDesiredActivationPolicy = NSApplicationActivati |
|
|
|
} |
|
|
|
|
|
|
|
[[NSApplication sharedApplication] setActivationPolicy: AvnDesiredActivationPolicy]; |
|
|
|
|
|
|
|
[[NSUserDefaults standardUserDefaults] setBool:NO forKey:@"NSFullScreenMenuItemEverywhere"]; |
|
|
|
|
|
|
|
[[NSApplication sharedApplication] setHelpMenu: [[NSMenu new] initWithTitle:@""]]; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
@ -425,6 +425,7 @@ private: |
|
|
|
WindowEvents = events; |
|
|
|
[Window setCanBecomeKeyAndMain]; |
|
|
|
[Window disableCursorRects]; |
|
|
|
[Window setTabbingMode:NSWindowTabbingModeDisallowed]; |
|
|
|
} |
|
|
|
|
|
|
|
virtual HRESULT Show () override |
|
|
|
|