EffectCraft: An open-source motion graphics and compositing tool written by scratch in pure Rust
Merge origin/main into fix/1089-fedora-fonts.
Vikram Bhaskaran75a3258b29f3
diff --cc crates/ui-egui/src/lib.rsindex 108c6db23,7f8e02683..8aad6c5ca--- a/crates/ui-egui/src/lib.rs+++ b/crates/ui-egui/src/lib.rs@@@ -1609,12 -2175,36 +2175,39 @@@ impl EffectcraftApp}}- fn frame(&mut self, ui: &mut egui::Ui) {- let ctx = ui.ctx().clone();- self.apply_gpu_failure(&ctx);- self.run_dialog_answers();- self.auto.begin_frame();- self.frames.set_context(&ctx);+ /// The app's only non-paint entry: one tick of background work.+ ///+ /// This runs for every eframe logic callback, including the logic-only ticks of a hidden+ /// window (which never reach [`Self::draw`]). It must therefore do no input handling, no+ /// layout and no presentation: engine/job queues, autosave, playback, audio, the control+ /// channel, screenshots and the close guard. Everything here is idempotent for a pass that+ /// `Context::request_discard` replays.+ pub fn tick(&mut self, ctx: &egui::Context, frame: &eframe::Frame) {+ self.now = self.clock.now();+ // The compositor exists before the first paint and while hidden (device-loss handling+ // must run there too).+ self.init_gpu(frame);+ self.apply_gpu_failure(ctx);+ if self.gpu_failure_applied == Some(true) {+ self.close_after_device_loss(ctx);+ return;+ }+ // Focus comes from the fresh viewport copy; a full pass's `InputState::focused` is only a+ // fallback (a logic-only tick leaves it at the previous pass's value).+ let focused = ctx.input(|i| i.viewport().focused.or(Some(i.focused)));+ self.focused = focused.unwrap_or(self.focused);+ // The interface language's fallback fonts are installed in `draw` (fonts need a pass), but+ // commands handled here use the right catalog already.+ let language = crate::i18n::language(self);+ crate::i18n::set_current(language);++ // #1089: a font-menu rescan runs off the UI thread. Poll it on the logic tick so the++ // status and the menu update even when the window is not painting.++ crate::panels::text_panels::poll_font_rescan(self, ctx);+ if self.styled_language != language {+ self.want_paint = true;+ }+ // Frames and worker completions wake the app even while it is hidden.+ self.frames.set_context(ctx);if self.session.render_job.is_some() {self.session.poll_render();ctx.request_repaint_after(std::time::Duration::from_millis(100));