Skip to content
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

Fixes a bug where you had to use ⌘Q twice to quit the mac app. #2901

Merged
merged 1 commit into from
May 15, 2021

Conversation

sandymcfadden
Copy link
Contributor

Fix

Fixes #2676

In Mac OS there the expected behavior is that when you close the window of an app that it stays running and you can open it again from the dock. Then if you quit the app using ⌘Q it completely closes.

Currently in order to fully quit you need to press ⌘Q twice which is unexpected. This resolves that by allowing you to close the window and reopen it, but also quit the app as expected.

Test

  1. Open Mac app.
  2. Close the window.
  3. App should still be in the dock.
  4. App should open again when you click it.
  5. Quit the app with ⌘Q or using the context menu when clicking on the doc icon.
  6. App should fully quit.

Release

  • Fixed a bug where the Mac app wouldn't quit on the first request.

@sandymcfadden sandymcfadden added this to the 2.12.0 milestone May 6, 2021
@sandymcfadden sandymcfadden requested a review from a team May 6, 2021 11:55
@sandymcfadden sandymcfadden self-assigned this May 6, 2021
Copy link
Member

@codebykat codebykat left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Works great! Tested the build on OSX, I did not test on other platforms but I assume the platform check prevents it from affecting anything else. One note - it might be nice to add a comment for our future selves. The on('before-quit') => shouldQuit = true; bit is something I am 100% not going to understand why it's there in 6 months 😂

Adding in a comment explaining the listener for 'before-quit'
@sandymcfadden sandymcfadden force-pushed the fix/closing-app-mac-electron branch from a8ebab6 to 0d28813 Compare May 15, 2021 22:45
@sandymcfadden
Copy link
Contributor Author

Good call @codebykat thank you. I've added a comment now.

@sandymcfadden sandymcfadden merged commit b1f7007 into develop May 15, 2021
@sandymcfadden sandymcfadden deleted the fix/closing-app-mac-electron branch May 15, 2021 23:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Double ⌘Q needed to quit the application
2 participants