-
Notifications
You must be signed in to change notification settings - Fork 423
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
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.
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.
^^ @ne0rrmatrix friendly ping
#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.
Looking at this closely I realized it does not support all devices and I have another idea I am working on. I will close this as it not compliant with guidelines for new features. IE, it has not gone through the process of being evaluated and it does not bypass it by being a fix for a bug report. Adding new features that require code maintence and ongoing support should be voted on and go through the approval process. |
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.