Go to index / Go to protocols

cosmic_toplevel_management_unstable_v1 ↗

cosmic_toplevel_management_unstable_v1
zcosmic_toplevel_manager_v1

Version 4
Compositor Support
Version 4
cosmic 1.0.0

control open apps

This protocol allows clients such as a taskbar to request the compositor to preform typical actions on open toplevels. The compositor is in all cases free to ignore the request.

zcosmic_toplevel_manager_v1
request destroy()
Destructor

    destroy the zcosmic_toplevel_manager_v1

    This request indicates that the client has finished using the zcosmic_toplevel_manager_v1 object and that it can be safely destroyed.

    zcosmic_toplevel_manager_v1
    enum zcosmic_toplelevel_management_capabilities_v1 {
        close = 1,
        activate = 2,
        maximize = 3,
        minimize = 4,
        fullscreen = 5,
        move_to_workspace = 6,
        sticky = 7,
        move_to_ext_workspace = 8,
    }
    • close — close request is available
    • activate — activate request is available
    • maximize — set_maximized and unset_maximized requests are available
    • minimize — set_minimized and unset_minimized requests are available
    • fullscreen — set_fullscreen and unset_fullscreen requests are available
    • move_to_workspace — move_to_workspace request is available
      Available since version 2
    • sticky — set_sticky and unset_sticky requests are available
      Available since version 3
    • move_to_ext_workspace — move_to_ext_workspace request is available
      Available since version 4
    zcosmic_toplevel_manager_v1
    event capabilities(
        capabilities: array,
    )
    • capabilities — array of 32-bit 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 closing toplevels, a button triggering the close request should not be displayed.

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

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

    The capabilities are sent as an array of 32-bit unsigned integers in native endianness.

    zcosmic_toplevel_manager_v1
    request close(
        toplevel: object<zcosmic_toplevel_handle_v1>,
    )

      request that a toplevel be closed

      If the compositor honors this request, the zcosmic_toplevel_handle_v1.closed event will be sent.

      zcosmic_toplevel_manager_v1
      request activate(
          toplevel: object<zcosmic_toplevel_handle_v1>,
          seat: object<wl_seat>,
      )

        request that a toplevel be activated

        If the compositor honors this request, the zcosmic_toplevel_handle_v1.state event will be sent.

        zcosmic_toplevel_manager_v1
        request set_maximized(
            toplevel: object<zcosmic_toplevel_handle_v1>,
        )

          request that a toplevel be maximized

          If the compositor honors this request, the zcosmic_toplevel_handle_v1.state event will be sent.

          zcosmic_toplevel_manager_v1
          request unset_maximized(
              toplevel: object<zcosmic_toplevel_handle_v1>,
          )

            request that a toplevel be unmaximized

            If the compositor honors this request, the zcosmic_toplevel_handle_v1.state event will be sent.

            zcosmic_toplevel_manager_v1
            request set_minimized(
                toplevel: object<zcosmic_toplevel_handle_v1>,
            )

              request that a toplevel be minimized

              If the compositor honors this request, the zcosmic_toplevel_handle_v1.state event will be sent.

              zcosmic_toplevel_manager_v1
              request unset_minimized(
                  toplevel: object<zcosmic_toplevel_handle_v1>,
              )

                request that a toplevel be unminimized

                If the compositor honors this request, the zcosmic_toplevel_handle_v1.state event will be sent.

                zcosmic_toplevel_manager_v1
                request set_fullscreen(
                    toplevel: object<zcosmic_toplevel_handle_v1>,
                    output: nullable object<wl_output>,
                )

                  request that a toplevel be fullscreened

                  If the compositor honors this request, the zcosmic_toplevel_handle_v1.state and potentially the zcosmic_toplevel_handle_v1.output_enter/output_leave events will be sent.

                  The output parameter a hint to the compositor and may be ignored. A value of NULL indicates that the compositor should choose the target output, if it honors the fullscreen request.

                  zcosmic_toplevel_manager_v1
                  request unset_fullscreen(
                      toplevel: object<zcosmic_toplevel_handle_v1>,
                  )

                    request that a toplevel be unfullscreened

                    If the compositor honors this request, the zcosmic_toplevel_handle_v1.state event will be sent.

                    zcosmic_toplevel_manager_v1
                    request set_rectangle(
                        toplevel: object<zcosmic_toplevel_handle_v1>,
                        surface: object<wl_surface>,
                        x: int,
                        y: int,
                        width: int,
                        height: int,
                    )

                      designate a rectangle to represent a toplevel

                      If a client using this protocol displays UI elements corresponding to toplevels, it may use this request to inform the server about such a relation. This information may be used by the server, for example as the target for a minimize animation.

                      If the client sets more than one rectangle, only the most recently set rectangle is considered.

                      The dimensions are given in surface-local coordinates.

                      Setting width=height=0 removes the current rectangle if one was set.

                      zcosmic_toplevel_manager_v1
                      request move_to_workspace(
                          toplevel: object<zcosmic_toplevel_handle_v1>,
                          workspace: object<zcosmic_workspace_handle_v1>,
                          output: object<wl_output>,
                      )
                      Available since version 2Deprecated since version 4

                        move toplevel to workspace

                        Move window to workspace, on given output.

                        zcosmic_toplevel_manager_v1
                        request set_sticky(
                            toplevel: object<zcosmic_toplevel_handle_v1>,
                        )
                        Available since version 3

                          request that a toplevel be made sticky

                          If the compositor honors this request, the zcosmic_toplevel_handle_v1.state event will be sent.

                          zcosmic_toplevel_manager_v1
                          request unset_sticky(
                              toplevel: object<zcosmic_toplevel_handle_v1>,
                          )
                          Available since version 3

                            request that a toplevel be removed of the sticky status

                            If the compositor honors this request, the zcosmic_toplevel_handle_v1.state event will be sent.

                            zcosmic_toplevel_manager_v1
                            request move_to_ext_workspace(
                                toplevel: object<zcosmic_toplevel_handle_v1>,
                                workspace: object<ext_workspace_handle_v1>,
                                output: object<wl_output>,
                            )
                            Available since version 4

                              move toplevel to workspace

                              Move window to workspace, on given output.

                              zcosmic_toplevel_manager_v1
                              enum error {
                                  invalid_rectangle = 0,
                              }
                              • invalid_rectangle — the provided rectangle is invalid