mirror of
https://github.com/storytold/photocraft.git
synced 2026-12-02 20:16:29 -05:00
Merge pull request #19201 from storytold/fix/main-ci-freebsd-headless-appearance
ui: a headless context starts no desktop appearance watcher (FreeBSD nightly)
This commit is contained in:
1 file changed
+5
-4
@@ -74,10 +74,11 @@ pub(crate) fn install(ctx: &egui::Context, fonts: &UiFonts<'_>, frame: Option<De
|
||||
// benches, the web) gets none: otherwise the held buttons Windows reports (no real button is down) end every
|
||||
// scripted press as a lost release.
|
||||
let desktop: Arc<dyn WindowSystem> = if frame.is_some() { Arc::new(Desktop) } else { Arc::new(NoWindows) };
|
||||
let mut spec = InstallSpec::new(ShellInfo::default().backend(Backend::from_env()), desktop)
|
||||
.wheel(wheel)
|
||||
.app_id(crate::os_window::app_id())
|
||||
.system(SystemReader::start(move || wake.request_repaint()));
|
||||
// The same goes for the OS's appearance: a headless context starts no desktop watcher. Each watcher has a worker
|
||||
// thread, and a test binary that runs every test in one process (plain `cargo test` on FreeBSD and Windows) would
|
||||
// otherwise keep one per context until it can spawn no more threads.
|
||||
let system = if frame.is_some() { SystemReader::start(move || wake.request_repaint()) } else { SystemReader::unwatched() };
|
||||
let mut spec = InstallSpec::new(ShellInfo::default().backend(Backend::from_env()), desktop).wheel(wheel).app_id(crate::os_window::app_id()).system(system);
|
||||
if let Some(decision) = frame {
|
||||
spec = spec.frame(decision);
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user