diff --git a/src/applet/mod.rs b/src/applet/mod.rs index 727ff244..74c72570 100644 --- a/src/applet/mod.rs +++ b/src/applet/mod.rs @@ -277,7 +277,7 @@ impl Context { subsurface_id.clone(), )) }, - on_surface_action(crate::surface::action::destroy_popup(window_id)), + on_surface_action(crate::surface::Action::DestroyPopup(window_id)), on_surface_action, ) .delay(Duration::from_millis(100)) diff --git a/src/surface/action.rs b/src/surface/action.rs index 2d21ffef..21709e74 100644 --- a/src/surface/action.rs +++ b/src/surface/action.rs @@ -18,7 +18,7 @@ pub fn destroy_subsurface(id: iced_core::window::Id) -> Action { Action::DestroySubsurface(id) } -#[cfg(feature = "wayland")] +#[cfg(all(feature = "wayland", feature = "winit"))] #[must_use] pub fn app_popup( settings: impl Fn(&mut App) -> iced_runtime::platform_specific::wayland::popup::SctkPopupSettings @@ -52,7 +52,7 @@ pub fn app_popup( } /// Used to create a subsurface message from within a widget. -#[cfg(feature = "wayland")] +#[cfg(all(feature = "wayland", feature = "winit"))] #[must_use] pub fn simple_subsurface( settings: impl Fn() -> iced_runtime::platform_specific::wayland::subsurface::SctkSubsurfaceSettings @@ -81,7 +81,7 @@ pub fn simple_subsurface( } /// Used to create a popup message from within a widget. -#[cfg(feature = "wayland")] +#[cfg(all(feature = "wayland", feature = "winit"))] #[must_use] pub fn simple_popup( settings: impl Fn() -> iced_runtime::platform_specific::wayland::popup::SctkPopupSettings @@ -112,7 +112,7 @@ pub fn simple_popup( ) } -#[cfg(feature = "wayland")] +#[cfg(all(feature = "wayland", feature = "winit"))] #[must_use] pub fn subsurface( settings: impl Fn(&mut App) -> iced_runtime::platform_specific::wayland::subsurface::SctkSubsurfaceSettings diff --git a/src/surface/mod.rs b/src/surface/mod.rs index 23c10a64..c08108ee 100644 --- a/src/surface/mod.rs +++ b/src/surface/mod.rs @@ -1,7 +1,6 @@ // Copyright 2025 System76 // SPDX-License-Identifier: MPL-2.0 -#[cfg(feature = "winit")] pub mod action; use iced::Limits;