* [NativeMenu] [Refactoring] Move Default Menu creation from native lib to C# (C# side of code)
* fix return type for IAvnApplicationCommands
* [Native] menu refactoring (ObjC side)
* fix nullref
* minor refactor
Co-authored-by: Jumar Macato <16554748+jmacato@users.noreply.github.com>
Co-authored-by: Dan Walmsley <dan@walms.co.uk>
#6700 implemented non-client click support for macOS but it caused non-client clicks to get sent even for clicks on the client area, causing #6827. Fix this by checking that the click is outside the view's bounds before raising the non-client click.
- Adds a "resize reason" to platform `Resized` events
- Which is used by the auto-sizing code to determine whether to reset `SizeToContent`
- Also other improvements to the reset logic for `SizeToContent`:
- Don't reset it if the size hasn't changed
- Don't reset it if `CanResize == false`
- Only reset the dimensions whose size has changed
- Obsolete the `BeginAutoSizing`/`AutoSizing` feature in `WindowBase`
It was causing both parent and child windows to think they were the key window at the same time and it's not really needed anymore since the implementation of real child windows as far as I can see.
Added some new plumbing to facilitate this:
- A managed event is raised `IPlatformLifetimeEventsImpl.ShutdownRequested`
- This event is subscribed from `ClassicDesktopStyleApplicationLifetime`
- Which tries to close all windows
- And returns false to cancel the OS-level close if not all windows could be closed