feat(wayland): let a layer surface change its input region
This commit is contained in:
parent
87c0358985
commit
65e9faa43c
1 changed files with 13 additions and 0 deletions
|
|
@ -1,5 +1,6 @@
|
||||||
//! Interact with the window of your application.
|
//! Interact with the window of your application.
|
||||||
|
|
||||||
|
use crate::core::Rectangle;
|
||||||
use crate::core::window::Id as SurfaceId;
|
use crate::core::window::Id as SurfaceId;
|
||||||
use iced_runtime::{
|
use iced_runtime::{
|
||||||
self, Action, Task,
|
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 },
|
||||||
|
)),
|
||||||
|
))
|
||||||
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue