Leaking content of other windows on startup
- Dominant language
- Rust
- Stars
- 48.2k
- Forks
- 4.8k
- Avg merge
- 3d 16h
- Merged PRs (30d)
- 171
Description
## Bevy version
Tested on `0.9`, `0.10`, `0.11`, `0.12.1`
## Relevant system information
```ignore
AdapterInfo { name: "NVIDIA GeForce RTX 2070 SUPER", vendor: 4318, device: 7812, device_type: DiscreteGpu, driver: "NVIDIA", driver_info: "545.29.06", backend: Vulkan }
SystemInfo { os: "Linux 22.04 Pop!_OS", kernel: "6.6.6-76060606-generic", cpu: "AMD Ryzen 5 3600 6-Core Processor", core_count: "6", memory: "15.5 GiB" }
```
## What you did
Launch an app window with Bevy:
```rs
use bevy::prelude::*;
fn main() {
App::new().add_plugins(DefaultPlugins).run();
}
```
## What went wrong
There is a moment when starting the app where the app window is already opened, but the content is not yet cleared.
In this time frame, the app window contains a snippet of other apps which are currently opened.
In the following video, I open the Bevy app on my second screen while having a browser with the Bevy website open on the first screen.
You can see that the Bevy app briefly shows the browser and OBS in the app window.
https://github.com/bevyengine/bevy/assets/13908946/dad35c60-56a1-4ef5-99e9-c969853104cf
Instead, I would expect the app window to render the clear color / background color immediately.
## Additional information
- Looks like this is an old bug, I can reproduce with a lot of Bevy versions.
- The length of the moment before the window creation and first paint can vary, e.g. it's shorter in release mode. Sometimes it can be really long which is also annoying for iterative debugging.
- This is probably a Linux-specific issue. Tested on Pop!_OS.
Contributor guide
Research direction
Start by running the minimal App::new().add_plugins(DefaultPlugins).run() reproduction on Linux and observe the window before its first paint. Trace the DefaultPlugins window and rendering startup path; done means the window immediately shows the configured clear or background color without displaying contents from other applications.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- linux, rust
- Domain
- computer-graphics, desktop, operating-systems
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 38/100