chore: surface task helper

This commit is contained in:
Ashley Wulber 2026-04-28 23:08:58 -04:00 committed by Ashley Wulber
parent 0ee5131670
commit 5938776c26
2 changed files with 5 additions and 0 deletions

View file

@ -587,6 +587,7 @@ impl Core {
self.app_type
}
#[must_use]
#[cfg(feature = "winit")]
pub fn blur(
&self,

View file

@ -80,6 +80,10 @@ pub enum Action {
Task(Arc<dyn Fn() -> Task<Action> + Send + Sync>),
}
pub fn surface_task<M: Send + Sync + 'static>(action: Action) -> Task<crate::Action<M>> {
crate::task::message(crate::Action::Cosmic(crate::app::Action::Surface(action)))
}
impl std::fmt::Debug for Action {
#[cold]
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {