Fix button press handling on notification popover
This commit is contained in:
parent
13aa62cef8
commit
9d10b0228f
1 changed files with 4 additions and 1 deletions
|
|
@ -26,7 +26,10 @@ impl ObjectImpl for NotificationPopoverInner {
|
||||||
fn constructed(&self, obj: &NotificationPopover) {
|
fn constructed(&self, obj: &NotificationPopover) {
|
||||||
obj.add_controller(&cascade! {
|
obj.add_controller(&cascade! {
|
||||||
gtk4::GestureClick::new();
|
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() {
|
if let Some(id) = obj.id() {
|
||||||
obj.inner().notifications.invoke_action(id, "default");
|
obj.inner().notifications.invoke_action(id, "default");
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue