mirror of
https://github.com/storytold/craft-libs.git
synced 2026-11-26 02:09:00 +00:00
ui-contract: a window's builder carries the app's hidden state only until its first pass, so a palette hidden later gets one Visible command
This commit is contained in:
@@ -98,8 +98,9 @@ pub(crate) fn show_viewport(ctx: &Context, open: &ViewportOpen<'_>, mut body: im
|
||||
level: standing.level,
|
||||
resizable: open.resizable,
|
||||
taskbar: spec.taskbar,
|
||||
// The builder's visibility opens a window the app's state hides already hidden.
|
||||
hidden: PerViewport::<Record>::with(ctx, viewport, |record| record.awaiting_first_paint) || hidden,
|
||||
// The builder's visibility opens a window the app's state hides already hidden, and only opens it: egui would
|
||||
// send each later change of it as a command beside the one below.
|
||||
hidden: PerViewport::<Record>::with(ctx, viewport, |record| record.awaiting_first_paint || (hidden && record.facts.is_none())),
|
||||
active: spec.takes_focus,
|
||||
passes_pointer: spec.passes_pointer,
|
||||
app_id: &app,
|
||||
|
||||
Reference in New Issue
Block a user