Skip to content

Commit

Permalink
Automatically turn off splash screen if SWT_GTK4=1
Browse files Browse the repository at this point in the history
When using GTK4 we must not run any GTK3 initialization. Therefore
automatically apply -nosplash when SWT_GTK4=1

Fixes #831
  • Loading branch information
jonahgraham authored and HannesWell committed Feb 5, 2025
1 parent b9f26bf commit e7a2e4a
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions features/org.eclipse.equinox.executable.feature/library/eclipse.c
Original file line number Diff line number Diff line change
Expand Up @@ -445,6 +445,20 @@ JNIEXPORT int run(int argc, _TCHAR* argv[], _TCHAR* vmArgs[])
setenv(firstThreadEnvVariable, "1", 1);
#endif

#ifdef LINUX
if (!noSplash) {
char *swtGtk4 = getenv("SWT_GTK4");
if (swtGtk4 != NULL && strcmp(swtGtk4, "1") == 0) {
// The eclipse launcher uses GTK3 exclusively, therefore when starting GTK4
// it must be started without a splash screen
// https://github.com/eclipse-equinox/equinox/issues/831
// If the user didn't already specify -nosplash print a warning and turn the splashscreen off
_ftprintf(stderr, "WARNING: SWT_GTK4 does not support splash screen yet. Therefore it has been disabled. To suppress this message launch with -nosplash\n");
noSplash = 1;
}
}
#endif

return _run(argc, argv, vmArgs);
}

Expand Down

0 comments on commit e7a2e4a

Please sign in to comment.