-
-
Notifications
You must be signed in to change notification settings - Fork 7k
[macOS] Modify behaviour when last editor gets closed #8023
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
Conversation
e7fe15e
to
d129e78
Compare
✅ Build completed.
Please test this code using one of the following:
⬇️ http://downloads.arduino.cc/javaide/pull_requests/arduino-PR-8023-BUILD-774-linux32.tar.xz
⬇️ http://downloads.arduino.cc/javaide/pull_requests/arduino-PR-8023-BUILD-774-linux64.tar.xz
⬇️ http://downloads.arduino.cc/javaide/pull_requests/arduino-PR-8023-BUILD-774-windows.zip
⬇️ http://downloads.arduino.cc/javaide/pull_requests/arduino-PR-8023-BUILD-774-macosx.zip
⬇️ http://downloads.arduino.cc/javaide/pull_requests/arduino-PR-8023-BUILD-774-linuxarm.tar.xz
i️ The linuxarm
build is still experimental and may not be always available.
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.
Tested this out on macOS 10.12.6.
When I close all the IDE windows, the app now stays open. Cmd-N can be used to create a new sketch, same for File -> New
app/src/processing/app/Base.java
Outdated
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.
Let's remove the commented code :)
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.
I left it there for a reason :) On my trials, if dispose() gets called the toolbar doesn't disappear but clicking on any element has no effect. I believe it's a broader bug, since the toolbar handlers are declared inside the first Editor instance. If we refactor the code dispose() should be called, so it's more like a reminder :)
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.
Better error handling here?
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.
Absolutely (no idea about how to handle it anyway)
@sandeepmistry same here, despite I've noticed that if you have multiple tabs and decide to close the first one, the app "goes away" (as in: stays in background, do not kill itself, but tabs are gone if you click again on it) instead of showing the other tabs kept open.
cc @facchinm
@gvarisco can you expand on that? The "new" behaviour should only kick in if a single Editor windows is open (multiple tabs on the same editor don't count they are part of an "atomic" sketch).
At reopen I asked @akash73 what is the expected behaviour for OSX users and we agreed to implement "new empty sketch" instead than "reopen last sketch". It can be changed of course 😉
Clarified with @facchinm - all good on my side. LGTM.
Don't call System.exit() but trust the ThinkDifferent handler Handle reopen only if no editor is visible Don't dispose last closing editor (so its toolbars are still in active state)
d129e78
to
36da22c
Compare
Uh oh!
There was an error while loading. Please reload this page.
Fixes #8021 and #936