From 8b31e83d5827891df54172be7a2d58d84c6bdc8d Mon Sep 17 00:00:00 2001 From: Hojjat Date: Wed, 20 May 2026 10:24:28 -0600 Subject: [PATCH] fix(test): `--features applet` only fix(test): `--feature wayland` only --- src/applet/mod.rs | 4 ++-- src/widget/text.rs | 2 +- src/widget/text_editor.rs | 2 +- src/widget/text_input/input.rs | 4 ++-- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/applet/mod.rs b/src/applet/mod.rs index 37635bf4..b9805c9b 100644 --- a/src/applet/mod.rs +++ b/src/applet/mod.rs @@ -290,7 +290,7 @@ impl Context { ) } - pub fn applet_tooltip<'a, Message: 'static>( + pub fn applet_tooltip<'a, Message: Clone + 'static>( &self, content: impl Into>, tooltip: impl Into>, @@ -502,7 +502,7 @@ impl Context { } } - pub fn text<'a>(&self, msg: impl Into>) -> crate::widget::Text<'a, crate::Theme> { + pub fn text<'a>(&self, msg: impl Into>) -> crate::widget::Text<'a> { let msg = msg.into(); let t = match self.size { Size::Hardcoded(_) => crate::widget::text, diff --git a/src/widget/text.rs b/src/widget/text.rs index 9fe051ac..192adda3 100644 --- a/src/widget/text.rs +++ b/src/widget/text.rs @@ -50,7 +50,7 @@ impl<'a> Text<'a> { } fn uses_popup_context_menu(&self) -> bool { - #[cfg(feature = "wayland")] + #[cfg(all(feature = "wayland", feature = "winit"))] if matches!( crate::app::cosmic::WINDOWING_SYSTEM.get(), Some(crate::app::cosmic::WindowingSystem::Wayland) diff --git a/src/widget/text_editor.rs b/src/widget/text_editor.rs index 9bbe2718..368beba2 100644 --- a/src/widget/text_editor.rs +++ b/src/widget/text_editor.rs @@ -130,7 +130,7 @@ impl<'a, Message: Clone + 'static> TextEditor<'a, Message> { } fn uses_popup_context_menu(&self) -> bool { - #[cfg(feature = "wayland")] + #[cfg(all(feature = "wayland", feature = "winit"))] if matches!( crate::app::cosmic::WINDOWING_SYSTEM.get(), Some(crate::app::cosmic::WindowingSystem::Wayland) diff --git a/src/widget/text_input/input.rs b/src/widget/text_input/input.rs index c46f895c..fe5855e5 100644 --- a/src/widget/text_input/input.rs +++ b/src/widget/text_input/input.rs @@ -585,7 +585,7 @@ where } fn uses_popup_context_menu(&self) -> bool { - #[cfg(feature = "wayland")] + #[cfg(all(feature = "wayland", feature = "winit"))] if matches!( crate::app::cosmic::WINDOWING_SYSTEM.get(), Some(crate::app::cosmic::WindowingSystem::Wayland) @@ -1030,7 +1030,7 @@ where ); // On Wayland: if right-click just set context_menu_position, create a popup instead. - #[cfg(feature = "wayland")] + #[cfg(all(feature = "wayland", feature = "winit"))] if matches!( crate::app::cosmic::WINDOWING_SYSTEM.get(), Some(crate::app::cosmic::WindowingSystem::Wayland)