chore(layer shell): add padding action

This commit is contained in:
Ashley Wulber 2026-04-20 15:33:26 -04:00 • committed by Ashley Wulber
parent e0c7d353aa
commit f6fa506f6c
3 changed files with 54 additions and 12 deletions

View file

@ -2,7 +2,7 @@
use crate::core::window::Id as SurfaceId;
use iced_runtime::{
self,
self, Action, Task,
platform_specific::{
self,
wayland::{
@ -10,7 +10,7 @@ use iced_runtime::{
layer_surface::{IcedMargin, SctkLayerSurfaceSettings},
},
},
task, Action, Task,
task,
};
pub use cctk::sctk::shell::wlr_layer::{Anchor, KeyboardInteractivity, Layer};
@ -114,3 +114,14 @@ pub fn set_layer<Message>(id: SurfaceId, layer: Layer) -> Task<Message> {
)),
))
}
pub fn set_padding<Message>(
id: SurfaceId,
padding: IcedMargin,
) -> Task<Message> {
task::effect(Action::PlatformSpecific(
platform_specific::Action::Wayland(wayland::Action::LayerSurface(
wayland::layer_surface::Action::Padding { id, padding },
)),
))
}