From 30ff3d654218cbb8883a8660c283d4733fb1a612 Mon Sep 17 00:00:00 2001 From: Wez Furlong Date: Wed, 9 Dec 2020 14:30:18 -0800 Subject: [PATCH] fixup build for macos after notify_rust updates --- wezterm-gui/src/main.rs | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/wezterm-gui/src/main.rs b/wezterm-gui/src/main.rs index 057d2afef..344f5a34b 100644 --- a/wezterm-gui/src/main.rs +++ b/wezterm-gui/src/main.rs @@ -298,11 +298,17 @@ fn run_terminal_gui(config: config::ConfigHandle, opts: StartCommand) -> anyhow: fn toast_notification(title: &str, message: &str) { #[cfg(not(windows))] { - notify_rust::Notification::new() - .summary(title) - .body(message) + #[allow(unused_mut)] + let mut notif = notify_rust::Notification::new(); + notif.summary(title).body(message); + + #[cfg(not(target_os = "macos"))] + { // Stay on the screen until dismissed - .hint(notify_rust::Hint::Resident(true)) + notif.hint(notify_rust::Hint::Resident(true)); + } + + notif // timeout isn't respected on macos .timeout(0) .show()