Skip to content

Commit

Permalink
Merge pull request #514 from JakeStanger/fix/tray-right-click
Browse files Browse the repository at this point in the history
fix(tray): cannot activate menu options with right click
  • Loading branch information
JakeStanger authored Mar 29, 2024
2 parents b48ba4c + 30b11db commit 4aab6d5
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/modules/tray/interface.rs
Original file line number Diff line number Diff line change
@@ -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;
Expand Down Expand Up @@ -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
});
}

Expand Down

0 comments on commit 4aab6d5

Please sign in to comment.