Skip to content
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

Automatically turn off splash screen if SWT_GTK4=1 #833

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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");
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Would it be possible to support splash-screens with GTK4 or is this too complicated?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It will be - this is a temporary state to resolve #831. To do splash screens on GTK4 we need to use GTK4 to start the splash on the native side. That means the launcher will need GTK4 soon.

What I think we will need to do is similar to what we do in SWT. I created #836 for adding the real version of the splash screen for GTK4.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

PS I was looking for a simple patch to write for eclipse launcher to make sure I understood build flow. If this change seems unnecessary, then we can also just close it and work on the correct GTK4 splash screens at a suitable time in the future.

noSplash = 1;
}
}
#endif

return _run(argc, argv, vmArgs);
}

Expand Down
Loading