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

[ATL-483] mac not to quit with all windows closed #487

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

fstasi
Copy link
Contributor

@fstasi fstasi commented Aug 25, 2021

Why

As reported closing the IDE when the last window is closed is an uncommon pattern in IDEs, and for good. This will enable opening projects from within the IDE2 even when no projects are currently open.

How

Listen to quit event and close the application only if not running on macOS

Jira task

@fstasi fstasi requested a review from ubidefeo August 25, 2021 15:42
Copy link

@ubidefeo ubidefeo left a comment

Choose a reason for hiding this comment

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

The IDE won't quit when closing the last window (workspace) but it won't allow me to open anything.
New, Open, Open Recent and Examples will not let me do anything

@per1234 per1234 added os: macos Specific to macOS operating system topic: code Related to content of the project itself type: enhancement Proposed improvement labels Oct 24, 2021
@per1234
Copy link
Contributor

per1234 commented Nov 1, 2021

Fixes #91

@per1234
Copy link
Contributor

per1234 commented Sep 27, 2022

No explanation was provided for the closure of this PR, so I reopen it. If it is to be closed, the reason must be clearly documented:

Was the approach taken in the PR fatally flawed? If so, document exactly what was the flaw so that the mistake can be avoided on the next attempt.

Is there some unfinished work on the PR? If so, document exactly what is missing so that work can be completed.

@per1234 per1234 reopened this Sep 27, 2022
@per1234 per1234 assigned kittaakos and unassigned fstasi Sep 27, 2022
@beldenfox
Copy link

It would be a lot of work to complete this PR. All menu bar handling is on the renderer side. Each renderer builds its own menu tree and then calls on main to install it (CHANNEL_SET_MENU_WITH_NODE_ID). Main builds a native copy of the menu tree and installs the copy. When a menu item is clicked on main calls back into the renderer to invoke the handler (CHANNEL_MAIN_MENU_ITEM_DID_CLICK).

When the last sketch window is closed the native menu bar is left behind. Attempting to execute an item causes main to send a message to the destroyed renderer leading to an uncaught exception.

From what I can tell this architecture is inherited from Theia.

@kittaakos kittaakos removed their assignment Feb 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
os: macos Specific to macOS operating system topic: code Related to content of the project itself type: enhancement Proposed improvement
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Don't exit IDE application when last window is closed when running on macOS
5 participants