Struct wayland_client::core::subcompositor::SubSurface
[−]
[src]
pub struct SubSurface<S: Surface> { // some fields omitted }
A wayland subsurface.
It wraps a surface, to be integrated into a parent surface.
Methods
impl<S: Surface> SubSurface<S>
fn destroy(self) -> S
Frees the Surface
from its role of subsurface
and returns it.
fn set_position(&self, x: i32, y: i32)
Sets the position of the subsurface in the parent surface coordinate system.
The change will tale effect at the next Surface::commit()
call on the parent
surface.
fn set_sync(&self, b: bool)
Sets of unsets the subsurface into synchronysed mode.
When in synchronised mode, the changes of this surface are not applied when
calling commit()
, but rather cached, and will be applied when the parents
commit is called.
When a subsurface is set to synchronised mode, all its children subsurfaces are forcedinto this mode as well.
fn restack_sibling<R: Surface>(&self, other: &SubSurface<R>, stack: Stacking)
Sets this surface to be displayed above or below other
, which
must be one of its siblings (but not itself).
Panics if other
does not have the same parent as self
or if
other == self
.
fn restack_parent<R: Surface>(&self, other: &R, stack: Stacking)
Sets this surface to be displayed above or below other
, which
must be its parent.
Panics if other
is not the parent of self
.
Note: this method requires parent to be passed to ensure it is still alive, as a parent can be destroyed without destroying its children.