Skip to content

xwayland_surface_v1¤

wayland.xwayland_surface_v1 ¤

Interface for associating xwayland windows to wl_surfaces

An Xwayland surface is a surface managed by an Xwayland server. It is used for associating surfaces to Xwayland windows.

The Xwayland server associated with actions in this interface is determined by the Wayland client making the request.

The client must call wl_surface.commit on the corresponding wl_surface for the xwayland_surface_v1 state to take effect.

Methods:

  • set_serial

    Associates a xwayland window to a wl_surface

  • destroy

    Destroy the xwayland surface object

error ¤

set_serial ¤

set_serial(serial_lo: int, serial_hi: int) -> None

Associates a xwayland window to a wl_surface

Associates an Xwayland window to a wl_surface. The association state is double-buffered, see wl_surface.commit.

The serial_lo and serial_hi parameters specify a non-zero monotonic serial number which is entirely unique and provided by the Xwayland server equal to the serial value provided by a client message with a message type of the WL_SURFACE_SERIAL atom on the X11 window for this surface to be associated to.

The serial value in the WL_SURFACE_SERIAL client message is specified as having the lo-bits specified in l[0] and the hi-bits specified in l[1].

If the serial value provided by serial_lo and serial_hi is not valid, the invalid_serial protocol error will be raised.

An X11 window may be associated with multiple surfaces throughout its lifespan. (eg. unmapping and remapping a window).

For each wl_surface, this state must not be committed more than once, otherwise the already_associated protocol error will be raised.

Parameters:

  • serial_lo ¤

    (int) –

    The lower 32-bits of the serial number associated with the x11 window

  • serial_hi ¤

    (int) –

    The upper 32-bits of the serial number associated with the x11 window

destroy ¤

destroy() -> None

Destroy the xwayland surface object

Destroy the xwayland_surface_v1 object.

Any already existing associations are unaffected by this action.