arduino-ide icon indicating copy to clipboard operation
arduino-ide copied to clipboard

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

Open fstasi opened this issue 3 years ago • 1 comments

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.

Expected behavior when closing the last sketch (window):

  • on Linux and Windows:
    • IDE2 quits. (Nothing to do. IDE2 behaves like this.)
  • on macOS:
    • IDE2 does not quit,
    • The IDE2 icon stays on the dock: clicking on the IDE2 opens a new temp sketch. Every time the user clicks on the IDE2 icon on the dock after closing the last window, the temp sketch number increases: for example sketch_sept15a, sketch_sept15b, etc.
    • The Arduino IDE status bar remains active and usable. For instance, macOS users can open a sketch from the sketchbook, a recent one, an example, etc.
    • macOS users can quit the IDE2 from Arduino IDE > Quit Arduin IDE (or with +Q)

fstasi avatar Jan 19 '22 11:01 fstasi

Originally reported by @paschlie here:

  • The App should not quit upon the closing of the last open editor window; instead it should open an open-project window, including an option to create a new project

If one considers the app's file menu; it really makes no sense to be forced to open a new file, prior to closing a currently open one; but if once the currently open file is closed, the app quits, then the file menu becomes inaccessible and can't be used to open another; which is not really a useful nor thereby a desirable behavior.

kittaakos avatar Sep 15 '22 07:09 kittaakos