mirror of
https://github.com/storytold/egui.git
synced 2026-11-19 17:12:28 +01:00
An inspection request is served from a frame, and a minimized or occluded window runs none: eframe skips the whole pass, and wgpu hands out no surface texture. An inspector attached to a backgrounded app could only time out. * `ViewportCommand::RequestPaintWhileHidden` asks for a painted frame from a hidden window. It rides the command channel, which already reaches the integration while hidden (`run_logic` hands it the pending commands), so `Context` needs nothing new. * eframe paints when a pending action wants paint: that command, or a screenshot, which asks for the same thing. * egui-wgpu captures without a surface texture: the capture renders to its own texture anyway, and only the present needs the surface. Pending screenshot callbacks used to be dropped silently whenever the frame could not be acquired, which also hit visible-but-occluded windows. `egui_inspection` sends the command, so nothing raises or focuses the window. Repro and manual test: `cargo run -p test_inspection_hidden_window`. Verified on macOS: screenshots and trees are served while the window is minimized. Replaces: * https://github.com/emilk/egui/pull/8566 * [x] I have followed the instructions in the PR template Written by Claude (LLM). 🤖 Generated with [Claude Code](https://claude.com/claude-code) --------- Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com> Co-authored-by: Lucas Meurer <hi@lucasmerlin.me>
Repro for inspecting an app whose window is hidden (minimized or occluded).
cargo run -p test_inspection_hidden_window
The app serves the egui_inspection protocol and runs an inspector client in the same process.
Minimize the window, or cover it completely, and watch what the requests do.