diff --git a/src/modules/mod.rs b/src/modules/mod.rs index ec3bb65..2a15252 100644 --- a/src/modules/mod.rs +++ b/src/modules/mod.rs @@ -382,7 +382,7 @@ impl ModuleFactory for BarModuleFactory { } ModuleUpdateEvent::TogglePopup(button_id) if !disable_popup => { debug!("Toggling popup for {} [#{}] (button id: {button_id})", name, id); - if popup.is_visible() && popup.current_widget().unwrap_or_default() == id { + if popup.visible() && popup.current_widget().unwrap_or_default() == id { popup.hide(); } else { popup.show(id, button_id); @@ -455,7 +455,7 @@ impl ModuleFactory for PopupModuleFactory { } ModuleUpdateEvent::TogglePopup(_) if !disable_popup => { debug!("Toggling popup for {} [#{}] (button id: {button_id})", name, id); - if popup.is_visible() && popup.current_widget().unwrap_or_default() == id { + if popup.visible() && popup.current_widget().unwrap_or_default() == id { popup.hide(); } else { popup.show(id, button_id); diff --git a/src/popup.rs b/src/popup.rs index 0a85a7f..5946e99 100644 --- a/src/popup.rs +++ b/src/popup.rs @@ -229,7 +229,7 @@ impl Popup { } /// Checks if the popup is currently visible - pub fn is_visible(&self) -> bool { + pub fn visible(&self) -> bool { self.window.is_visible() }