From 9d10b0228f7aab4cc570d0f051f7c55d70a9d417 Mon Sep 17 00:00:00 2001 From: Ian Douglas Scott Date: Thu, 23 Sep 2021 15:54:12 -0700 Subject: [PATCH] Fix button press handling on notification popover --- src/notification_popover.rs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/notification_popover.rs b/src/notification_popover.rs index a51fafc7..77e0d712 100644 --- a/src/notification_popover.rs +++ b/src/notification_popover.rs @@ -26,7 +26,10 @@ impl ObjectImpl for NotificationPopoverInner { fn constructed(&self, obj: &NotificationPopover) { obj.add_controller(&cascade! { gtk4::GestureClick::new(); - ..connect_pressed(clone!(@weak obj => move |_, _, _, _| { + ..connect_released(clone!(@weak obj => move |_, n_press, _, _| { + if n_press != 1 { + return; + } if let Some(id) = obj.id() { obj.inner().notifications.invoke_action(id, "default"); }