COSMIC toplevel management
zcosmic_toplevel_manager_v1
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.
destroy()
This request indicates that the client has finished using the zcosmic_toplevel_manager_v1 object and that it can be safely destroyed.
close(toplevel: object<zcosmic_toplevel_handle_v1>)
Argument | Type | Description |
---|---|---|
toplevel | object<zcosmic_toplevel_handle_v1> |
If the compositor honors this request, the zcosmic_toplevel_handle_v1.closed event will be sent.
activate(toplevel: object<zcosmic_toplevel_handle_v1>, seat: object<wl_seat>)
Argument | Type | Description |
---|---|---|
toplevel | object<zcosmic_toplevel_handle_v1> | |
seat | object<wl_seat> |
If the compositor honors this request, the zcosmic_toplevel_handle_v1.state event will be sent.
set_maximized(toplevel: object<zcosmic_toplevel_handle_v1>)
Argument | Type | Description |
---|---|---|
toplevel | object<zcosmic_toplevel_handle_v1> |
If the compositor honors this request, the zcosmic_toplevel_handle_v1.state event will be sent.
unset_maximized(toplevel: object<zcosmic_toplevel_handle_v1>)
Argument | Type | Description |
---|---|---|
toplevel | object<zcosmic_toplevel_handle_v1> |
If the compositor honors this request, the zcosmic_toplevel_handle_v1.state event will be sent.
set_minimized(toplevel: object<zcosmic_toplevel_handle_v1>)
Argument | Type | Description |
---|---|---|
toplevel | object<zcosmic_toplevel_handle_v1> |
If the compositor honors this request, the zcosmic_toplevel_handle_v1.state event will be sent.
unset_minimized(toplevel: object<zcosmic_toplevel_handle_v1>)
Argument | Type | Description |
---|---|---|
toplevel | object<zcosmic_toplevel_handle_v1> |
If the compositor honors this request, the zcosmic_toplevel_handle_v1.state event will be sent.
set_fullscreen(toplevel: object<zcosmic_toplevel_handle_v1>, output: object<wl_output>)
Argument | Type | Description |
---|---|---|
toplevel | object<zcosmic_toplevel_handle_v1> | |
output | object<wl_output>allow null |
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.
unset_fullscreen(toplevel: object<zcosmic_toplevel_handle_v1>)
Argument | Type | Description |
---|---|---|
toplevel | object<zcosmic_toplevel_handle_v1> |
If the compositor honors this request, the zcosmic_toplevel_handle_v1.state event will be sent.
set_rectangle(toplevel: object<zcosmic_toplevel_handle_v1>, surface: object<wl_surface>, x: int, y: int, width: int, height: int)
Argument | Type | Description |
---|---|---|
toplevel | object<zcosmic_toplevel_handle_v1> | |
surface | object<wl_surface> | |
x | int | |
y | int | |
width | int | |
height | int |
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.
move_to_workspace(toplevel: object<zcosmic_toplevel_handle_v1>, workspace: object<zcosmic_workspace_handle_v1>, output: object<wl_output>)
Argument | Type | Description |
---|---|---|
toplevel | object<zcosmic_toplevel_handle_v1> | |
workspace | object<zcosmic_workspace_handle_v1> | |
output | object<wl_output> |
Move window to workspace, on given output.
capabilities(capabilities: array)
Argument | Type | Description |
---|---|---|
capabilities | array | array of 32-bit 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_toplelevel_management_capabilities_v1 { close, activate, maximize, minimize, fullscreen, move_to_workspace }
Argument | Value | Description |
---|---|---|
close | 1 | close request is available |
activate | 2 | activate request is available |
maximize | 3 | set_maximized and unset_maximized requests are available |
minimize | 4 | set_minimized and unset_minimized requests are available |
fullscreen | 5 | set_fullscreen and unset_fullscreen requests are available |
move_to_workspacesince 2 | 6 | move_to_workspace request is available |
error { invalid_rectangle }
Argument | Value | Description |
---|---|---|
invalid_rectangle | 0 | the provided rectangle is invalid |
Compositor Support
Mutter 46 | KWin 6.2 | Sway 1.9 | COSMIC 1.0.0 | Hyprland 0.42.0 | niri 0.1.8 | Weston 13 | Mir 2.19 | GameScope 3.15.14 | Jay 1.7.0 | |
---|---|---|---|---|---|---|---|---|---|---|
zcosmic_toplevel_manager_v1 | x | x | x | 2 | x | x | x | x | x | x |
Copyright
Copyright © 2018 Ilia Bozhinov Copyright © 2020 Isaac Freund Copyright © 2022 wb9688 Copyright © 2022 Victoria Brekenfeld
Permission to use, copy, modify, distribute, and sell this software and its documentation for any purpose is hereby granted without fee, provided that the above copyright notice appear in all copies and that both that copyright notice and this permission notice appear in supporting documentation, and that the name of the copyright holders not be used in advertising or publicity pertaining to distribution of the software without specific, written prior permission. The copyright holders make no representations about the suitability of this software for any purpose. It is provided "as is" without express or implied warranty.
THE COPYRIGHT HOLDERS DISCLAIM ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL THE COPYRIGHT HOLDERS BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.