zulip-desktop icon indicating copy to clipboard operation
zulip-desktop copied to clipboard

Fixes #1187: Cannot close the app from full screen mode on macOS

Open enesonus opened this issue 1 year ago • 3 comments


What's this PR do? Fixes #1187. App was not closing at fullscreen mode at macOS. Changed the behavior for windows to leave fullscreen and then hide itself for macOS when pressed close button as many applications do so.

Any background context you want to provide?

Screenshots? ezgif-4-f031ceac53

You have tested this PR on:

  • [ ] Windows
  • [ ] Linux/Ubuntu
  • [x] macOS

enesonus avatar Mar 31 '23 11:03 enesonus

@enesonus On mac os, the application is not meant to explicitly close when all the windows are closed It's a native feature of Mac OS Reference:

  • https://www.howtogeek.com/279086/why-do-mac-apps-stay-open-when-i-hit-the-red-x-button/
  • https://stackoverflow.com/questions/58822323/for-electron-app-in-macos-when-is-app-quit-invoked

I hope the above helps out

cyrilchukwuebuka avatar Mar 31 '23 13:03 cyrilchukwuebuka

@cyrilchukwuebuka this PR is not for quitting the app, it hides the window as you say so. Issue #1187 states that at fullscreen red x button does not hide or close the window i.e. does nothing. This PR checks if the window is fullscreen, makes the window not fullscreen and then hides it as the native behavior of most apps at macOS when red x is pressed.

enesonus avatar Mar 31 '23 13:03 enesonus

Hi @andersk issue #1187 still seems to be persisting and this PR fixes it. Could you please give a review?

enesonus avatar Jan 27 '24 13:01 enesonus

@enesonus I’ve edited your commit with a real commit message; this is important for maintaining a readable Git history.

Merged, thanks!

andersk avatar Mar 22 '24 21:03 andersk

Thanks for the help @andersk! This was one of my first PRs and didn’t exactly know at that time how to write good commit messages.

enesonus avatar Mar 22 '24 21:03 enesonus