Go to index / Go to protocols

cosmic_output_management_unstable_v1 ↗

extension protocol to wlr-output-management

This protocol serves as an extension to wlr-output-management.

It primarily adds explicit output mirroring, while upstream is figuring out how to best support that.

It was designed against version 4 of wlr-output-management, but tries it's best to be forward compatible.

cosmic_output_management_unstable_v1
zcosmic_output_manager_v1

Version 3
Compositor Support
Version 3
cosmic 1.0.0

Output configuration manager

This interface provides extension points for wlr-output-management types.

zcosmic_output_manager_v1
enum error {
    already_extended = 1,
}
  • already_extended — object already created
zcosmic_output_manager_v1
request get_head(
    extended: new_id<zcosmic_output_head_v1>,
    head: object<zwlr_output_head_v1>,
)

    Get a zcosmic_output_head_v1 for an existing zwlr_output_head_v1

    Gets an extension object for zwlr_output_head_v1.

    As soon as the extended output is created, events will be dispatched with an accompanying done-event delivered to the matching zwlr_output_manager_v1 afterwards.

    Any further updates will produce new events, if properties of the zcosmic_output_head_v1 change, just like for the original zwlr_output_head_v1. Events should be handled as atomic, as denoted by zwlr_output_manager_v1::done.

    Trying to create more than one zcosmic_output_head_v1 per zwlr_output_head_v1 will raise an "already_extended" error.

    zcosmic_output_manager_v1
    request get_configuration(
        extended: new_id<zcosmic_output_configuration_v1>,
        config: object<zwlr_output_configuration_v1>,
    )

      Get a zcosmic_output_configuration_v1 for an existing zwlr_output_configuration_v1

      Gets an extension object for zwlr_output_configuration_v1.

      Trying to create more than one zcosmic_output_configuration_v1 per zwlr_output_configuration_v1 will raise an "already_extended" error.

      zcosmic_output_manager_v1
      request get_configuration_head(
          extended: new_id<zcosmic_output_configuration_head_v1>,
          config_head: object<zwlr_output_configuration_head_v1>,
      )

        Get a zcosmic_output_configuration_head_v1 for an existing zwlr_output_configuration_head_v1

        Gets an extension object for zwlr_output_configuration_head_v1.

        Trying to create more than one zcosmic_output_configuration_head_v1 per zwlr_output_configuration_head_v1 will raise an "already_extended" error.

        zcosmic_output_manager_v1
        request release()
        Destructor

          Destroy this global

          Destroys this global. All previously created objects remain valid.

          zcosmic_output_manager_v1
          request set_xwayland_primary(
              head: nullable object<zcosmic_output_head_v1>,
          )
          Available since version 3
          • head — head to be advertised as primary

          set head as the primary for xwayland

          This requests a head to be advertised as the primary output via randr to Xwayland.

          No head has to be marked primary, if null is passed Xwayland won't advertise a primary output. Sending a disabled head will be ignored to avoid races.

          cosmic_output_management_unstable_v1
          zcosmic_output_head_v1

          Version 3

          Output extension object

          Extension to zwlr_output_head_v1.

          Adds additional read-only properties.

          Properties sent via this interface are applied atomically via the wlr_output_manager.done event. No guarantees are made regarding the order in which properties are sent.

          zcosmic_output_head_v1
          event scale_1000(
              scale_1000: int,
          )

            current scale

            This events describes the scale of the head in the global compositor space multiplied by 1000 for additional precision.

            It is only sent if the output is enabled.

            zcosmic_output_head_v1
            event mirroring(
                name: nullable string,
            )

              mirroring other output

              This events describes that the head is mirroring another. In these cases name contains the unique name of the matching zwlr_output_head_v1. If the name is null, no head is being mirrored onto this one.

              For mirrored heads the position-event is meaningless.

              It is only sent if the output is enabled.

              zcosmic_output_head_v1
              request release()
              Destructor

                destroy the output head

                Using this request a client can tell the compositor that it is not interested in the head object anymore.

                zcosmic_output_head_v1
                event adaptive_sync_available(
                    available: uint<adaptive_sync_availability>,
                )
                Available since version 2

                  is adaptive_sync available for this head

                  This events describes if adaptive_sync is available for this head.

                  It is only sent if the output is enabled.

                  zcosmic_output_head_v1
                  enum adaptive_sync_availability {
                      unsupported = 0,
                      requires_modeset = 1,
                      supported = 2,
                  }
                  Available since version 2
                  • unsupported — adaptive sync is not supported
                  • requires_modeset — automatic adaptive_sync is unavailable
                  • supported — adaptive sync is supported in all states
                  zcosmic_output_head_v1
                  event adaptive_sync_ext(
                      state: uint<adaptive_sync_state_ext>,
                  )
                  Available since version 2

                    current adaptive_sync state

                    This events describes the adaptive_sync state of this head.

                    It is only sent if the output is enabled.

                    zcosmic_output_head_v1
                    enum adaptive_sync_state_ext {
                        disabled = 0,
                        automatic = 1,
                        always = 2,
                    }
                    Available since version 2
                    • disabled — adaptive sync is disabled
                    • automatic — adaptive sync will be actived automatically
                    • always — adaptive sync is forced to be always active
                    zcosmic_output_head_v1
                    event xwayland_primary(
                        state: uint,
                    )
                    Available since version 3
                    • state — boolean if primary or not

                    is this head configured as the primary for xwayland

                    This event describes if this head is advertised as the primary output via randr to Xwayland.

                    At most one output is marked primary, but it is not guaranteed that any output is marked. It is only sent if the output is enabled.

                    cosmic_output_management_unstable_v1
                    zcosmic_output_configuration_v1

                    Version 1

                    Output configuration extension object

                    Extension to zwlr_output_configuration_v1.

                    Adds additional parameters to be tested/applyed via the original zwlr_output_configuration_v1.

                    zcosmic_output_configuration_v1
                    enum error {
                        already_finished = 1,
                        mirrored_head_busy = 2,
                    }
                    • already_finished — underlying configuration has already been used
                    • mirrored_head_busy — mirrored head is not enabled
                    zcosmic_output_configuration_v1
                    request mirror_head(
                        id: new_id<zwlr_output_configuration_head_v1>,
                        head: object<zwlr_output_head_v1>,
                        mirroring: object<zwlr_output_head_v1>,
                    )
                    • id — a new object to configure the head
                    • head — the head to be enabled
                    • mirroring — the head to be mirrored

                    enable and configure a head to mirror another head

                    Enable a head mirroring another.

                    This request creates a head configuration object that can be used to change the head's properties.

                    This is an alternative to zwlr_output_configuration_v1::enable_head or zwlr_output_configuration_v1::disable_head Using either with the same head argument will result in an already_configured_head error on the original zwlr_output_configuration_v1 object.

                    All properties are still required to be set to the resulting zwlr_output_configuration_head by the client as denoted in the original protocol. Some like set_position however might be ignored in mirroring configurations.

                    Trying to set a disabled or mirroring head as mirroring or calling disable_head/mirror_head after using a head as a mirroring argument will raise a mirrored_head_busy protocol error.

                    zcosmic_output_configuration_v1
                    event finished()

                      the configuration was used

                      This event indicates that the configuration is no longer available.

                      This usually happens when the original configuration was cancelled, suceeded or failed.

                      Upon receiving this event, the client should destroy this object.

                      The configration object becomes inert and any requests other than destroy will be ignored.

                      zcosmic_output_configuration_v1
                      request release()
                      Destructor

                        destroy the output configuration

                        Using this request a client can tell the compositor that it is not going to use the configuration object anymore. Any changes to the outputs will still be attached to the original zwlr_output_configuration_head_v1 if it isn't destroyed.

                        cosmic_output_management_unstable_v1
                        zcosmic_output_configuration_head_v1

                        Version 2

                        Output configuration head extension object

                        Extension to zwlr_output_configuration_head_v1.

                        Adds additional/alternative parameters to the original zwlr_output_configuration_head_v1.

                        Once the original zwlr_output_configuration_head_v1 is destroyed this object will become inert and all requests except release will be ignored.

                        zcosmic_output_configuration_head_v1
                        request set_scale_1000(
                            scale_1000: int,
                        )

                          set the scale multiplied by 1000

                          This request sets the head's scale multiplied by 1000 for additional precision.

                          This request is meant to be used in place of zwlr_output_configuration_head_v1::set_scale. Using set_scale and set_scale_1000 at once will thus raise an already_set error on the original zwlr_output_configuration_head_v1.

                          Any request conflicting with set_scale will also conflict with set_scale_1000.

                          zcosmic_output_configuration_head_v1
                          request release()
                          Destructor

                            destroy the output configuration head

                            Using this request a client can tell the compositor that it is not going to use the configuration object anymore. Already issued requests will still be attached to the original zwlr_output_configuration_head_v1 until it is destroyed.

                            zcosmic_output_configuration_head_v1
                            request set_adaptive_sync_ext(
                                state: uint<zcosmic_output_head_v1.adaptive_sync_state_ext>,
                            )
                            Available since version 2

                              set adaptive sync state

                              This request requests a new adaptive sync state.

                              This request is meant to be used in place of zwlr_output_configuration_head_v1::set_adaptive_sync. Using set_adaptive_sync and set_adaptive_sync_ext at once will thus raise an already_set error on the original zwlr_output_configuration_head_v1.

                              Any request conflicting with set_adaptive_sync will also conflict with set_adaptive_sync_ext.