feat(wayland): let a layer surface change its input region

This commit is contained in:
Hojjat 2026-08-27 18:00:50 -06:00 • committed by Ashley Wulber
parent 87c0358985
commit 65e9faa43c

View file

@ -1,5 +1,6 @@
//! Interact with the window of your application.
use crate::core::Rectangle;
use crate::core::window::Id as SurfaceId;
use iced_runtime::{
self, Action, Task,
@ -125,3 +126,15 @@ pub fn set_padding<Message>(
)),
))
}
/// <https://wayland.app/protocols/wayland#wl_surface:request:set_input_region>
pub fn set_input_zone<Message>(
id: SurfaceId,
zone: Option<Vec<Rectangle>>,
) -> Task<Message> {
task::effect(Action::PlatformSpecific(
platform_specific::Action::Wayland(wayland::Action::LayerSurface(
wayland::layer_surface::Action::InputZone { id, zone },
)),
))
}