Skip to content

Commit 381cdab

Browse files
committed
Hide splash screen asap if not using gui
Fixes arduino#1970 On macOS, when running, Arduino.app/Contents/MacOS/Arduino --upload sketch.ino a splash screen is visible the entire time the upload is running. This PR hides that splash screen as soon as it’s known for sure that the GUI should not be displayed. This makes for a slightly better user experience: there’s still a splash screen, but it only appears briefly at launch time. The [SplashScreen docs][] explain: > The splash screen can be displayed at application startup, before the > Java Virtual Machine (JVM) starts. ... is closed automatically as soon as > the first window is displayed by Swing/AWT (may be also closed manually > using the Java API, see below) [SplashScreen docs]: https://docs.oracle.com/javase/7/docs/api/java/awt/SplashScreen.html
1 parent a144887 commit 381cdab

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

Diff for: app/src/processing/app/Base.java

+4
Original file line numberDiff line numberDiff line change
@@ -218,6 +218,10 @@ public Base(String[] args) throws Exception {
218218
parser.parseArgumentsPhase1();
219219
commandLine = !parser.isGuiMode();
220220

221+
if (!parser.isGuiMode()) {
222+
SplashScreen.getSplashScreen().close();
223+
}
224+
221225
BaseNoGui.checkInstallationFolder();
222226

223227
// If no path is set, get the default sketchbook folder for this platform

0 commit comments

Comments
 (0)