From f50e3e10e8f5fdab1ba270e8d1b4b21a935db201 Mon Sep 17 00:00:00 2001 From: Alan Lin Date: Tue, 14 Jan 2025 02:00:23 +0800 Subject: [PATCH] fix tray name on linux (#363) --- .../util/desktop/systemtray/impl/ComposeSystemTrayForLinux.kt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/desktop/tray/linux/src/main/kotlin/ir/amirab/util/desktop/systemtray/impl/ComposeSystemTrayForLinux.kt b/desktop/tray/linux/src/main/kotlin/ir/amirab/util/desktop/systemtray/impl/ComposeSystemTrayForLinux.kt index 83359c6..92bec03 100644 --- a/desktop/tray/linux/src/main/kotlin/ir/amirab/util/desktop/systemtray/impl/ComposeSystemTrayForLinux.kt +++ b/desktop/tray/linux/src/main/kotlin/ir/amirab/util/desktop/systemtray/impl/ComposeSystemTrayForLinux.kt @@ -23,7 +23,8 @@ class ComposeSystemTrayForLinux : IComposeSystemTray { menu: List, onClick: () -> Unit ) { - val systemTray: SystemTray? = remember { SystemTray.get() } + val tooltipString = tooltip.rememberString() + val systemTray: SystemTray? = remember { SystemTray.get(tooltipString) } if (systemTray == null) { System.err.println("System tray is not supported") return @@ -36,7 +37,6 @@ class ComposeSystemTrayForLinux : IComposeSystemTray { GlobalLayoutDirection, ) } - val tooltipString = tooltip.rememberString() LaunchedEffect(awtImage) { systemTray.setImage(awtImage)