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

Window flashes white on launch on Windows #3625

Closed
zeozeozeo opened this issue Nov 24, 2023 · 11 comments · Fixed by #3631
Closed

Window flashes white on launch on Windows #3625

zeozeozeo opened this issue Nov 24, 2023 · 11 comments · Fixed by #3631
Labels
bug Something is broken eframe Relates to epi and eframe egui-winit porblems related to winit

Comments

@zeozeozeo
Copy link
Contributor

zeozeozeo commented Nov 24, 2023

Describe the bug
This was previously fixed in #1802, but was reintroduced in commit 1571027.

To Reproduce
Steps to reproduce the behavior:

  1. Start app in debug or release mode
  2. Window flashes white for ~0.5 seconds

Expected behavior
No window flash on startup.

Screenshots
window-flash

Desktop (please complete the following information):

  • OS: Windows 10
  • Version 0.24.0

Additional context
Perhaps the is_first_frame check is broken, or the window is being created with set_visible(true) in the first place, when it should start invisible until all assets are loaded.

@zeozeozeo zeozeozeo added the bug Something is broken label Nov 24, 2023
@7sDream
Copy link

7sDream commented Nov 24, 2023

Can reproduce this after upgrade to 0.24.0.

OS: Windows 11 Preview Build 25997

@zeozeozeo
Copy link
Contributor Author

Fixed in #3631.

@sourcebox
Copy link

I also had this issue on macOS, did not do extensive testing though.

emilk pushed a commit that referenced this issue Nov 27, 2023
This is a bug that can occur on Windows, previously it was fixed by only
showing the window after the first frame was rendered, but the bug
appeared again with egui 0.24.0. This commit fixes this bug by making
the window invisible on startup.

## Before


![window-flash](https://github.com/emilk/egui/assets/108888572/31a675af-8c30-46b1-a1af-653491cf67da)

## After


![no-window-flash](https://github.com/emilk/egui/assets/108888572/e7bfc429-033e-4842-8591-b9229143a60b)

<!--
Please read the "Making a PR" section of
[`CONTRIBUTING.md`](https://github.com/emilk/egui/blob/master/CONTRIBUTING.md)
before opening a Pull Request!

* Keep your PR:s small and focused.
* If applicable, add a screenshot or gif.
* If it is a non-trivial addition, consider adding a demo for it to
`egui_demo_lib`, or a new example.
* Do NOT open PR:s from your `master` branch, as that makes it hard for
maintainers to add commits to your PR.
* Remember to run `cargo fmt` and `cargo cranky`.
* Open the PR as a draft until you have self-reviewed it and run
`./scripts/check.sh`.
* When you have addressed a PR comment, mark it as resolved.

Please be patient! I will review your PR, but my time is limited!
-->

Closes #3625.
@emilk emilk added this to the 0.24.1 milestone Nov 27, 2023
@MrWheatley
Copy link

The white flashing is still happening to me with 0.25.0 and on master as well.

gif

@emilk emilk reopened this Jan 17, 2024
@emilk emilk added eframe Relates to epi and eframe egui-winit porblems related to winit labels Jan 17, 2024
@emilk
Copy link
Owner

emilk commented Jan 17, 2024

Are both the glow and wgpu backends affected?

@MrWheatley
Copy link

Trying to use the wgpu backend I get this error:

error: failed to select a version for `web-sys`.
    ... required by package `wgpu v0.18.0`
    ... which satisfies dependency `wgpu = "^0.18.0"` of package `eframe v0.25.0 (https://github.com/emilk/egui.git?branch=master#7733d1d8)`
    ... which satisfies git dependency `eframe` of package `temp v0.1.0 (C:\Users\mrmon\PycharmProjects\temp)`
versions that meet the requirements `^0.3.64` (locked to 0.3.67) are: 0.3.67

the package `wgpu` depends on `web-sys`, with features: `GpuComputePassTimestampWrite` but `web-sys` does not have these features.


failed to select a version for `web-sys` which could resolve this conflict

@torokati44
Copy link
Contributor

meta: This issue is currently "left behind" in the "0.24.1" milestone. Shouldn't it be moved into the rolling "Next Major Release" one now?

@emilk emilk modified the milestones: 0.24.1, Next Major Release Feb 7, 2024
@emilk
Copy link
Owner

emilk commented Feb 7, 2024

@torokati44 good catch!

@zeozeozeo
Copy link
Contributor Author

zeozeozeo commented Feb 7, 2024

The white flashing is still happening to me with 0.25.0 and on master as well.

gif

Can't replicate this on Windows, and the window flash in your example does seem much shorter. Are you on X11/Wayland?

@MrWheatley
Copy link

I'm on Windows 10. The flashes are very inconsistent for me. Sometimes they're long, sometimes they're short, and sometimes there are no flashes at all.

@zeozeozeo
Copy link
Contributor Author

Can't reproduce this on eframe 0.27.2

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something is broken eframe Relates to epi and eframe egui-winit porblems related to winit
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants