1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
// SPDX-License-Identifier: MPL-2.0
// SPDX-FileCopyrightText: 2026 FernTech
//! App-wide default post-root wrapper.
//!
//! Stored in `app_state` by extensions (notably the debug inspector)
//! that want to splice a wrapper widget around every window's root
//! without per-window opt-in. `WindowManager::create_window` looks
//! this up after invoking the user's `root_builder`, before computing
//! modal focus targets.
//!
//! Per-window `WindowConfig::post_root` overrides this default for
//! that window only — useful when a particular window opts out of the
//! wrapper or wants a different one.
use Rc;
use WidgetId;
use WidgetTree;
/// Closure that runs after each window's `root_builder` returns, wrapping
/// the user's root widget. Stored in `app_state` so it is shared across
/// every window the app opens at runtime.
///
/// The closure may be invoked from many windows over the app's lifetime
/// — it receives `&mut WidgetTree` and the user's root id, and returns
/// the id of the (possibly wrapped) widget to use as the window's
/// effective root.
>);