Skip to content

Fix welcome window closing when last editor is closed#1482

Open
Jhnv07 wants to merge 1 commit intoprocessing:mainfrom
Jhnv07:fix-welcome-window-close
Open

Fix welcome window closing when last editor is closed#1482
Jhnv07 wants to merge 1 commit intoprocessing:mainfrom
Jhnv07:fix-welcome-window-close

Conversation

@Jhnv07
Copy link

@Jhnv07 Jhnv07 commented Mar 16, 2026

Resolves: #1456

Summary

This PR fixes an issue where closing the last editor window also caused the Welcome window to close. The IDE currently treats the closing of the final editor as an application exit condition, which unintentionally closes the Welcome window as well.

Changes

The logic in Base.handleClose() has been updated so that when the last editor window is closed, the IDE shows the Welcome screen instead of exiting immediately. This ensures that the Welcome window remains available after closing the final editor, matching the expected behavior.

Validation

The change was tested locally by building and running Processing4 and verifying the following scenarios:

  • Opening a sketch and closing the editor returns to the Welcome screen.
  • Launching the IDE and interacting with the Welcome window still works as expected.

Notes

During testing, I noticed an additional edge case: if the Welcome window is manually closed first and the final editor window is then closed, the Welcome screen reopens. This appears to be related to the logic relying on the welcome.four.show preference rather than tracking whether the Welcome window was closed during the session. I would be happy to investigate this behavior further if needed.

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.

Closing a sketch closes the Welcome window as well.

1 participant