From 37ab3b1603ce3697d69d28129b5941dac843e992 Mon Sep 17 00:00:00 2001 From: Daniel Eklöf Date: Wed, 24 Jul 2024 15:59:52 +0200 Subject: notify: don't create icon file on disk when we're not going to use it We always prefer the symbolic name. Thus, there's no need to write raw PNG data to disk if we have a symbolic name. Furthermore, keep the file open until the cache entry is evicted. --- notify.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'notify.h') diff --git a/notify.h b/notify.h index ba017276..d78af5fa 100644 --- a/notify.h +++ b/notify.h @@ -58,7 +58,8 @@ struct notification { struct notification_icon { char *id; char *symbolic_name; - char *tmp_file_on_disk; + char *tmp_file_name; + int tmp_file_fd; }; bool notify_notify(struct terminal *term, struct notification *notif); -- cgit v1.3