From cbcc2ffbdb4440e5c8d56ab1f15c82be7d1339c7 Mon Sep 17 00:00:00 2001 From: David Mann Date: Fri, 27 Nov 2026 00:09:55 +0100 Subject: [PATCH] ui-contract: a repaint request's cause names its caller repaint::request and request_of are #[track_caller], so egui's repaint causes name the component that asked, not the wrapper: how the hover fades that keep frames running were found (photocraft#17148). Co-Authored-By: Claude Opus 5.5 --- crates/ui-contract/src/runtime/egui/repaint.rs | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/crates/ui-contract/src/runtime/egui/repaint.rs b/crates/ui-contract/src/runtime/egui/repaint.rs index b69792cf87..b8b5e9e1ca 100644 --- a/crates/ui-contract/src/runtime/egui/repaint.rs +++ b/crates/ui-contract/src/runtime/egui/repaint.rs @@ -2,13 +2,15 @@ use egui::Context; -/// Asks for one more pass after this one. +/// Asks for one more pass after this one. The repaint cause names the caller. +#[track_caller] pub(crate) fn request(ctx: &Context) { crate::runtime::replay::note_unsettled(ctx); ctx.request_repaint(); } -/// Asks for a pass of `viewport` at once. +/// Asks for a pass of `viewport` at once. The repaint cause names the caller. +#[track_caller] pub(crate) fn request_of(ctx: &Context, viewport: egui::ViewportId) { crate::runtime::replay::note_unsettled(ctx); ctx.request_repaint_of(viewport);