more refactoring and clippy fixes

This commit is contained in:
Michael Aaron Murphy 2025-03-05 18:17:16 +01:00
parent e9b87cb1df
commit da27db5786
No known key found for this signature in database
GPG key ID: B2732D4240C9212C
3 changed files with 5 additions and 6 deletions

View file

@ -277,7 +277,7 @@ impl Context {
subsurface_id.clone(), 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, on_surface_action,
) )
.delay(Duration::from_millis(100)) .delay(Duration::from_millis(100))

View file

@ -18,7 +18,7 @@ pub fn destroy_subsurface(id: iced_core::window::Id) -> Action {
Action::DestroySubsurface(id) Action::DestroySubsurface(id)
} }
#[cfg(feature = "wayland")] #[cfg(all(feature = "wayland", feature = "winit"))]
#[must_use] #[must_use]
pub fn app_popup<App: Application>( pub fn app_popup<App: Application>(
settings: impl Fn(&mut App) -> iced_runtime::platform_specific::wayland::popup::SctkPopupSettings settings: impl Fn(&mut App) -> iced_runtime::platform_specific::wayland::popup::SctkPopupSettings
@ -52,7 +52,7 @@ pub fn app_popup<App: Application>(
} }
/// Used to create a subsurface message from within a widget. /// Used to create a subsurface message from within a widget.
#[cfg(feature = "wayland")] #[cfg(all(feature = "wayland", feature = "winit"))]
#[must_use] #[must_use]
pub fn simple_subsurface<Message: 'static, V>( pub fn simple_subsurface<Message: 'static, V>(
settings: impl Fn() -> iced_runtime::platform_specific::wayland::subsurface::SctkSubsurfaceSettings settings: impl Fn() -> iced_runtime::platform_specific::wayland::subsurface::SctkSubsurfaceSettings
@ -81,7 +81,7 @@ pub fn simple_subsurface<Message: 'static, V>(
} }
/// Used to create a popup message from within a widget. /// Used to create a popup message from within a widget.
#[cfg(feature = "wayland")] #[cfg(all(feature = "wayland", feature = "winit"))]
#[must_use] #[must_use]
pub fn simple_popup<Message: 'static, V>( pub fn simple_popup<Message: 'static, V>(
settings: impl Fn() -> iced_runtime::platform_specific::wayland::popup::SctkPopupSettings settings: impl Fn() -> iced_runtime::platform_specific::wayland::popup::SctkPopupSettings
@ -112,7 +112,7 @@ pub fn simple_popup<Message: 'static, V>(
) )
} }
#[cfg(feature = "wayland")] #[cfg(all(feature = "wayland", feature = "winit"))]
#[must_use] #[must_use]
pub fn subsurface<App: Application>( pub fn subsurface<App: Application>(
settings: impl Fn(&mut App) -> iced_runtime::platform_specific::wayland::subsurface::SctkSubsurfaceSettings settings: impl Fn(&mut App) -> iced_runtime::platform_specific::wayland::subsurface::SctkSubsurfaceSettings

View file

@ -1,7 +1,6 @@
// Copyright 2025 System76 <info@system76.com> // Copyright 2025 System76 <info@system76.com>
// SPDX-License-Identifier: MPL-2.0 // SPDX-License-Identifier: MPL-2.0
#[cfg(feature = "winit")]
pub mod action; pub mod action;
use iced::Limits; use iced::Limits;