Go to index / Go to protocols

cosmic_workspace_unstable_v2 ↗

cosmic_workspace_unstable_v2
zcosmic_workspace_manager_v2

Version 2
Compositor Support
Version 2
cosmic 1.0.0

list and control workspaces

This protocol extends ext-workspace-v1 with addtional requests and events.

The caller should call get_cosmic_workspace whenever a new ext workspace is created.

zcosmic_workspace_manager_v2
request get_cosmic_workspace(
    cosmic_workspace: new_id<zcosmic_workspace_handle_v2>,
    workspace: object<ext_workspace_handle_v1>,
)
Available since version 2

    get cosmic workspace extension object

    Request a zcosmic_workspace_handle_v2 extension object for an existing ext_workspace_handle_v1.

    If a zcosmic_workspace_handle_v2 already exists for the ext_workspace_handle_v1, this will raise a workspace_exists protocol error.

    zcosmic_workspace_manager_v2
    request destroy()
    Destructor

      destroy the zcosmic_workspace_manager_v2 object

      This request should be called either when the client will no longer use the zcosmic_workspace_manager_v2.

      zcosmic_workspace_manager_v2
      enum error {
          workspace_exists = 0,
      }
      • workspace_exists — zcosmic_workspace_handle_v2 already exists for ext_workspace_handle_v1

      cosmic_workspace_unstable_v2
      zcosmic_workspace_handle_v2

      Version 2

      a workspace handing a group of surfaces

      A zcosmic_workspace_handle_v2 object represents a a workspace that handles a group of surfaces.

      Each workspace has a name, conveyed to the client with the name event; a list of states, conveyed to the client with the state event; and optionally a set of coordinates, conveyed to the client with the coordinates event. The client may request that the compositor activate or deactivate the workspace.

      Each workspace can belong to only a single workspace group. Depepending on the compositor policy, there might be workspaces with the same name in different workspace groups, but these workspaces are still separate (e.g. one of them might be active while the other is not).

      zcosmic_workspace_handle_v2
      request destroy()
      Destructor

        destroy the zcosmic_workspace_handle_v1 object

        This request should be called either when the client will no longer use the zcosmic_workspace_handle_v1.

        zcosmic_workspace_handle_v2
        enum workspace_capabilities {
            rename = 1,
            set_tiling_state = 2,
            pin = 3,
            move = 4,
        }
        This is a bitfield
        • rename — rename request is available
        • set_tiling_state — set_tiling_state request is available
        • pin — pin and unpin requests are available
          Available since version 2
        • move — move_before and move_after requests are available
          Available since version 2
        zcosmic_workspace_handle_v2
        event capabilities(
            capabilities: uint<workspace_capabilities>,
        )
        • capabilities — capabilities

        compositor capabilities

        This event advertises the capabilities supported by the compositor. If a capability isn't supported, clients should hide or disable the UI elements that expose this functionality. For instance, if the compositor doesn't advertise support for removing workspaces, a button triggering the remove request should not be displayed.

        The compositor will ignore requests it doesn't support. For instance, a compositor which doesn't advertise support for remove will ignore remove requests.

        Compositors must send this event once after creation of a zcosmic_workspace_handle_v2. When the capabilities change, compositors must send this event again.

        zcosmic_workspace_handle_v2
        event tiling_state(
            state: uint<tiling_state>,
        )

          indicates if tiling behavior is enabled for this workspace

          This event is emitted immediately after the zcosmic_workspace_handle_v2 is created and each time the workspace tiling state changes, either because of a compositor action or because of a request in this protocol.

          zcosmic_workspace_handle_v2
          event state(
              state: uint<state>,
          )
          Available since version 2

            the state of the workspace changed

            This event is emitted immediately after the zcosmic_workspace_handle_v2 is created and each time the workspace state changes, either because of a compositor action or because of a request in this protocol.

            zcosmic_workspace_handle_v2
            enum tiling_state {
                floating_only = 0,
                tiling_enabled = 1,
            }
            • floating_only — The workspace has no active tiling properties
            • tiling_enabled — Tiling behavior is enabled for the workspace

            types of tiling state a workspace may have

            zcosmic_workspace_handle_v2
            enum state {
                pinned = 1,
            }
            This is a bitfieldAvailable since version 2
            • pinned — the workspace is pinned

            state of the workspace, extending the ext workspace state

            zcosmic_workspace_handle_v2
            request rename(
                name: string,
            )
            • name — new name of the workspace

            rename this workspace

            Request that this workspace is renamed.

            There is no guarantee the workspace will actually be renamed.

            zcosmic_workspace_handle_v2
            request set_tiling_state(
                state: uint<tiling_state>,
            )
            • state — the new tiling state of the workspace

            change the tiling state of this workspace

            Request that this workspace's tiling state is changed.

            There is no guarantee the workspace will actually change it's tiling state.

            zcosmic_workspace_handle_v2
            request move_before(
                other_workspace: object<ext_workspace_handle_v1>,
                axis: uint,
            )
            Available since version 2

              move before a different workspace

              Move a workspace to be before another workspace along a given axis.

              other_workspace may be on the same workspace group, or on a different group. If it's a different set, the workspace will also be moved to that group.

              axis should be a valid index in the coordinates on the workspace group other_workspace is on. The workspace will be positioned on the target group to have a coordinate with this component less than the value of the component for other_workspace. The exact coordinate values, or how other workspaces are moved to accommodate the workspace, is unspecified.

              The request will be ignored if axis is invalid or the compositor is otherwise unable to move the workspace.

              There is no guarantee the workspace will actually be moved.

              zcosmic_workspace_handle_v2
              request move_after(
                  other_workspace: object<ext_workspace_handle_v1>,
                  axis: uint,
              )
              Available since version 2

                move after a different workspace

                Move a workspace to be after another workspace along a given axis.

                See move_before.

                zcosmic_workspace_handle_v2
                request pin()
                Available since version 2

                  pin the workspace

                  Request that this workspace be pinned.

                  There is no guarantee the workspace will be actually pinned.

                  zcosmic_workspace_handle_v2
                  request unpin()
                  Available since version 2

                    pin the workspace

                    Request that this workspace be unpinned.

                    There is no guarantee the workspace will be actually unpinned.