-
Notifications
You must be signed in to change notification settings - Fork 412
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add initial support for Multiple Windows on MacOS #2260
base: main
Are you sure you want to change the base?
Add initial support for Multiple Windows on MacOS #2260
Conversation
Nice! Could you open a Docs PR to add this info to the MediaElement |
Yes I will do that now 😄 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Copilot reviewed 2 out of 3 changed files in this pull request and generated no suggestions.
Files not reviewed (1)
- samples/CommunityToolkit.Maui.Sample/Platforms/MacCatalyst/Info.plist: Language not supported
{ | ||
// Exit the app when the last window closes | ||
// This ensures app closes when last window closes on Mac | ||
Environment.Exit(0); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this a correct thing to do though? I honestly don't know hence the question.
I ask primarily because of this https://superuser.com/questions/53935/getting-mac-os-x-applications-to-close-after-last-window-closed/53940#53940 answer.
#if MACCATALYST | ||
protected override Window CreateWindow(IActivationState? activationState) | ||
{ | ||
Window window = base.CreateWindow(activationState); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So, e.g., on Windows the call is new Window(appShell)
and on Mac Catalyst it is base.CreateWindow(activationState)
.
Is this by design that appShell
is not passed in? Again honest question.
Description of Change
Add support for more than one window on MacOS. With this PR Media Element will now show multiple windows when you visit the Multi-Window Page on MacOS.
Linked Issues
PR Checklist
approved
(bug) orChampioned
(feature/proposal)main
at time of PRAdditional information
With this PR MacOS will fully support multiple windows on MacOS when using Media Element. Documentation will need updating to add the changes to Manifest file for MacOS.