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

Fix window maximization when using splash screen #14219

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

tortmayr
Copy link
Contributor

What it does

Avoid eager restore of maximized state in TheiaElectronWindow.init when a splash screen is configured (i.e. preventAutomaticShow config option is false)
Calling window.maximize() implicity also makes the window visibile. If preventAutomaticShow is true we have to make sure to invoke restoreMaximizeState after the main window is ready. Otherwise both the splashscreen and the preload window will be visible at the same time

Fixes #14218

How to test

  1. Build electron example app
  2. Start electron example app
  3. Maximize window and close app
  4. Start app again

Only the splash screen should be shown, main window should remain invisible until the splash screen is hidden.

Follow-ups

Review checklist

Reminder for reviewers

Avoid eager restore of maximized state in `TheiaElectronWindow.init`
when a splash screen is configured (i.e. `preventAutomaticShow` config
option is false)
Calling `window.maximize()` implicity also makes the window visibile.
If `preventAutomaticShow` is true we have to make sure to invoke
`restoreMaximizeState` after the main window is ready.
Otherwise both the splashscreen and the preload window will be visible
at the same time

Fixes eclipse-theia#14218
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Waiting on reviewers
Development

Successfully merging this pull request may close these issues.

[electron] Splash screen behavior is inconsistent with regards to starting maximized/unmaximized
1 participant