pub struct XdgSurface {
pub id: u32,
pub surface_id: u32,
pub configured: bool,
pub configure_serial: u32,
pub geometry: Option<(i32, i32, u32, u32)>,
pub toplevel: Option<XdgToplevel>,
}Expand description
An xdg_surface wraps a wl_surface with desktop shell semantics.
Fields§
§id: u32xdg_surface object ID
surface_id: u32Underlying wl_surface ID
configured: boolWhether the client has ack’d the latest configure
configure_serial: u32Last sent configure serial
geometry: Option<(i32, i32, u32, u32)>Window geometry (client-set visible bounds)
toplevel: Option<XdgToplevel>Associated toplevel (if any)
Implementations§
Source§impl XdgSurface
impl XdgSurface
pub fn new(id: u32, surface_id: u32) -> Self
Sourcepub fn ack_configure(&mut self, serial: u32) -> bool
pub fn ack_configure(&mut self, serial: u32) -> bool
Handle ack_configure from the client.
Sourcepub fn set_geometry(&mut self, x: i32, y: i32, width: u32, height: u32)
pub fn set_geometry(&mut self, x: i32, y: i32, width: u32, height: u32)
Set window geometry.