Skip to content

zwlr_layer_shell_v1¤

wayland.zwlr_layer_shell_v1 ¤

Create surfaces that are layers of the desktop

Clients can use this interface to assign the surface_layer role to wl_surfaces. Such surfaces are assigned to a "layer" of the output and rendered with a defined z-depth respective to each other. They may also be anchored to the edges and corners of a screen and specify input handling semantics. This interface should be suitable for the implementation of many desktop shell components, and a broad number of other applications that interact with the desktop.

Methods:

error ¤

layer ¤

Available layers for surfaces

These values indicate which layers a surface can be rendered in. They are ordered by z depth, bottom-most first. Traditional shell surfaces will typically be rendered between the bottom and top layers. Fullscreen shell surfaces are typically rendered at the top layer. Multiple surfaces can share a single layer, and ordering within a single layer is undefined.

get_layer_surface ¤

get_layer_surface(
    surface: wl_surface, output: wl_output, layer: layer, namespace: str
) -> zwlr_layer_surface_v1

Create a layer_surface from a surface

Create a layer surface for an existing surface. This assigns the role of layer_surface, or raises a protocol error if another role is already assigned.

Creating a layer surface from a wl_surface which has a buffer attached or committed is a client error, and any attempts by a client to attach or manipulate a buffer prior to the first layer_surface.configure call must also be treated as errors.

After creating a layer_surface object and setting it up, the client must perform an initial commit without any buffer attached. The compositor will reply with a layer_surface.configure event. The client must acknowledge it and is then allowed to attach a buffer to map the surface.

You may pass NULL for output to allow the compositor to decide which output to use. Generally this will be the one that the user most recently interacted with.

Clients can specify a namespace that defines the purpose of the layer surface.

Parameters:

  • layer ¤

    (layer) –

    Layer to add this surface to

  • namespace ¤

    (str) –

    Namespace for the layer surface

Returns:

destroy ¤

destroy() -> None

Destroy the layer_shell object

This request indicates that the client will not use the layer_shell object any more. Objects that have been created through this instance are not affected.