From 0c9cabd21a16ca3a0e8f27e91431e67c13d4902f Mon Sep 17 00:00:00 2001 From: Peter Krull Date: Tue, 21 Jan 2025 15:27:45 +0100 Subject: [PATCH] performance: Add app_id check to throttle icon fetch --- src/main.rs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/main.rs b/src/main.rs index 5dc26f7..506873c 100644 --- a/src/main.rs +++ b/src/main.rs @@ -461,7 +461,9 @@ impl Application for App { if let Some(toplevel) = self.toplevels.iter_mut().find(|x| x.handle == handle) { - toplevel.icon = desktop_info::icon_for_app_id(info.app_id.clone()); + if toplevel.info.app_id != info.app_id { + toplevel.icon = desktop_info::icon_for_app_id(info.app_id.clone()); + } toplevel.info = info; } }