1
0
mirror of https://github.com/emilk/egui.git synced 2026-09-02 14:50:03 -04:00

Replace uiless_pass flag with Context::is_visible

egui now derives "no ui is shown this pass" from the `minimized` /
`occluded` flags the integrations already report in `ViewportInfo`,
instead of a new `RawInput` flag that they had to set separately.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
This commit is contained in:
Emil Ernerfeldt
2026-08-04 17:02:10 +02:00
parent bb37c758c7
commit 51047205d8
9 changed files with 67 additions and 81 deletions

View File

@@ -37,7 +37,6 @@ impl eframe::App for App {
fn viewport_info(ctx: &egui::Context) -> String {
ctx.input(|i| {
use std::fmt::Write as _;
let ViewportInfo {
minimized,
focused,
@@ -57,12 +56,10 @@ fn viewport_info(ctx: &egui::Context) -> String {
];
for (name, value) in flags {
if let Some(value) = value {
use std::fmt::Write as _;
write!(s, " {name}={value}").ok();
}
}
write!(s, " uiless_pass={}", i.raw.uiless_pass).ok();
s
})
}