1
0
Fork 0
mirror of https://github.com/Zedfrigg/ironbar.git synced 2025-04-19 19:34:24 +02:00

Merge pull request #514 from JakeStanger/fix/tray-right-click

fix(tray): cannot activate menu options with right click
This commit is contained in:
Jake Stanger 2024-03-29 13:15:49 +00:00 committed by GitHub
commit 4aab6d5061
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -1,5 +1,6 @@
use super::diff::{Diff, MenuItemDiff};
use crate::{spawn, try_send};
use glib::Propagation;
use gtk::prelude::*;
use gtk::{CheckMenuItem, Image, Label, Menu, MenuItem, SeparatorMenuItem};
use std::collections::HashMap;
@ -251,8 +252,9 @@ impl TrayMenuItem {
let tx = tx.clone();
let id = info.id;
widget.connect_activate(move |_item| {
widget.connect_button_press_event(move |_item, _button| {
try_send!(tx, id);
Propagation::Proceed
});
}