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

[electron] Splash screen behavior is inconsistent with regards to starting maximized/unmaximized #14218

Open
tortmayr opened this issue Sep 25, 2024 · 0 comments · May be fixed by #14219
Open

Comments

@tortmayr
Copy link
Contributor

Bug Description:

When a splash screen is configured by default the preventAutomaticShow option is set to true.
This means the main window should remain invisible until the layout is fully initialized.
This works as expected when the Theia electron app starts the main Window unmaximized.
However, when the app is started with isMaximized=true then the main Window will still show early.
Resulting in an overlay of the preload window and the splash screen

Expected behavior:
Using a splashscreen, the main window should remain invisible until the splash screen is closed independent of whether the window is maximized or not

Steps to Reproduce:

  1. Build the electron example app
  2. Start the app
  3. If the window starts not maximized:
    (State. Splash screen is shown, main window is invisible until splash screen is removed)
    3.1 Maximize the window
    3.2 Close the app
    3.3 Restart the app and continue with 4.
  4. If the window is maximized
    State: Splash screen is shown. Main window becomes immediately visible and is visible alongside splashscreen

Here is demonstration of the Bug using Theia IDE under Linux:

theia_splash.mp4

Additional Information

Reproducible with following OS/versions:

  • Operating System: Ubunut 22.04, Windows 11
  • Theia Version: Theia IDE 1.52, Current Theia master
tortmayr added a commit to eclipsesource/theia that referenced this issue Sep 25, 2024
Avoid eager restore of maximized state in `TheiaElectronWindow.ini`t
when a splash screen is configured (i.e. `preventAutomaticShow` config
otion 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
tortmayr added a commit to eclipsesource/theia that referenced this issue Sep 25, 2024
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
@tortmayr tortmayr linked a pull request Sep 25, 2024 that will close this issue
1 task
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant