fix: close sni menu on item destruction
This commit is contained in:
@ -26,7 +26,7 @@ struct ToolTip {
|
||||
class Item : public sigc::trackable {
|
||||
public:
|
||||
Item(const std::string&, const std::string&, const Json::Value&, const Bar&);
|
||||
~Item() = default;
|
||||
~Item();
|
||||
|
||||
std::string bus_name;
|
||||
std::string object_path;
|
||||
|
@ -74,6 +74,13 @@ Item::Item(const std::string& bn, const std::string& op, const Json::Value& conf
|
||||
cancellable_, interface);
|
||||
}
|
||||
|
||||
Item::~Item() {
|
||||
if (this->gtk_menu != nullptr) {
|
||||
this->gtk_menu->popdown();
|
||||
this->gtk_menu->detach();
|
||||
}
|
||||
}
|
||||
|
||||
bool Item::handleMouseEnter(GdkEventCrossing* const& e) {
|
||||
event_box.set_state_flags(Gtk::StateFlags::STATE_FLAG_PRELIGHT);
|
||||
return false;
|
||||
|
Reference in New Issue
Block a user