Skip to content

zwlr_output_manager_v1¤

wayland.zwlr_output_manager_v1 ¤

Output device configuration manager

This interface is a manager that allows reading and writing the current output device configuration.

Output devices that display pixels (e.g. a physical monitor or a virtual output in a window) are represented as heads. Heads cannot be created nor destroyed by the client, but they can be enabled or disabled and their properties can be changed. Each head may have one or more available modes.

Whenever a head appears (e.g. a monitor is plugged in), it will be advertised via the head event. Immediately after the output manager is bound, all current heads are advertised.

Whenever a head's properties change, the relevant wlr_output_head events will be sent. Not all head properties will be sent: only properties that have changed need to.

Whenever a head disappears (e.g. a monitor is unplugged), a wlr_output_head.finished event will be sent.

After one or more heads appear, change or disappear, the done event will be sent. It carries a serial which can be used in a create_configuration request to update heads properties.

The information obtained from this protocol should only be used for output configuration purposes. This protocol is not designed to be a generic output property advertisement protocol for regular clients. Instead, protocols such as xdg-output should be used.

Methods:

  • create_configuration

    Create a new output configuration object

  • stop

    Stop sending events

  • on_head

    Introduce a new head.

  • on_done

    Sent all information about current configuration.

  • on_finished

    The compositor has finished with the manager.

events

head ¤

head(head: zwlr_output_head_v1) -> None

Introduce a new head

This event introduces a new head. This happens whenever a new head appears (e.g. a monitor is plugged in) or after the output manager is bound.

done ¤

done(serial: int) -> None

Sent all information about current configuration

This event is sent after all information has been sent after binding to the output manager object and after any subsequent changes. This applies to child head and mode objects as well. In other words, this event is sent whenever a head or mode is created or destroyed and whenever one of their properties has been changed. Not all state is re-sent each time the current configuration changes: only the actual changes are sent.

This allows changes to the output configuration to be seen as atomic, even if they happen via multiple events.

A serial is sent to be used in a future create_configuration request.

Parameters:

  • serial ¤

    (int) –

    Current configuration serial

finished ¤

finished() -> None

The compositor has finished with the manager

This event indicates that the compositor is done sending manager events. The compositor will destroy the object immediately after sending this event, so it will become invalid and the client should release any resources associated with it.

create_configuration ¤

create_configuration(serial: int) -> zwlr_output_configuration_v1

Create a new output configuration object

Create a new output configuration object. This allows to update head properties.

Returns:

stop ¤

stop() -> None

Stop sending events

Indicates the client no longer wishes to receive events for output configuration changes. However the compositor may emit further events, until the finished event is emitted.

The client must not send any more requests after this one.

on_head ¤

on_head(head: zwlr_output_head_v1) -> None

Introduce a new head.

Override to handle wayland.zwlr_output_manager_v1.events.head.

on_done ¤

on_done(serial: int) -> None

Sent all information about current configuration.

Override to handle wayland.zwlr_output_manager_v1.events.done.

on_finished ¤

on_finished() -> None

The compositor has finished with the manager.

Override to handle wayland.zwlr_output_manager_v1.events.finished.