COSMIC overlap notify
zcosmic_overlap_notify_v1
The purpose of this protocol is to enable layer-shell client to get notifications if part of their surfaces are occluded other elements (currently toplevels and other layer-surfaces).
You can request a notification object for any of your zwlr_layer_surface_v1 surfaces, which will then emit overlap events.
notify_on_overlap(overlap_notification: new_id<zcosmic_overlap_notification_v1>, layer_surface: object<zwlr_layer_surface_v1>)
Argument | Type | Description |
---|---|---|
overlap_notification | new_id<zcosmic_overlap_notification_v1> | |
layer_surface | object<zwlr_layer_surface_v1> |
Requests notifications for toplevels and layer-surfaces entering and leaving the surface-area of the given zwlr_layer_surface_v1. This can be used e.g. to implement auto-hide functionality.
To stop receiving notifications, destroy the returned zcosmic_overlap_notification_v1 object.
zcosmic_overlap_notification_v1
destroy()
This request should be called when the client has no interest in overlap notifications anymore.
toplevel_enter(toplevel: object<ext_foreign_toplevel_handle_v1>, x: int, y: int, width: int, height: int)
Argument | Type | Description |
---|---|---|
toplevel | object<ext_foreign_toplevel_handle_v1> | |
x | int | x coordinate of the upper-left corner of the overlapping area |
y | int | y coordinate of the upper-left corner of the overlapping area |
width | int | width of the overlapping area |
height | int | height of the overlapping area |
A ext_foreign_toplevel_handle_v1 has entered the surface area.
This event will be emitted once for every ext_foreign_toplevel_handle_v1 representing this toplevel.
Compositors are free to update the overlapping area by sending additional `toplevel_enter` events for the same toplevel without sending `toplevel_leave` in between.
toplevel_leave(toplevel: object<ext_foreign_toplevel_handle_v1>)
Argument | Type | Description |
---|---|---|
toplevel | object<ext_foreign_toplevel_handle_v1> |
A ext_foreign_toplevel_handle_v1 has left the surface area.
This event will be emitted once for every ext_foreign_toplevel_handle_v1 representing this toplevel.
layer_enter(identifier: string, namespace: string, exclusive: uint, layer: uint<zwlr_layer_shell_v1.layer>, x: int, y: int, width: int, height: int)
Argument | Type | Description |
---|---|---|
identifier | string | unique identifier for the overlapping layer-surface |
namespace | string | namespace for the layer surface |
exclusive | uint | if the overlapping surface is requesting an exclusive area or not |
layer | uint<zwlr_layer_shell_v1.layer> | layer the overlapping surface sits on |
x | int | x coordinate of the upper-left corner of the overlapping area |
y | int | y coordinate of the upper-left corner of the overlapping area |
width | int | width of the overlapping area |
height | int | height of the overlapping area |
A zwlr_layer_surface_v1 has entered the surface area.
Compositors are free to update the overlapping area by sending additional `layer_enter` events for the same surface without sending `layer_leave` in between.
The overlapping region is given surface-relative to the zwlr_layer_surface_v1 used to create this notification object.
layer_leave(identifier: string)
Argument | Type | Description |
---|---|---|
identifier | string | unique identifier for the overlapping layer-surface |
A zwlr_layer_surface_v1 has left the surface area.
Compositor Support
Mutter | KWin | Sway | COSMIC | Hyprland | niri | Weston | Labwc | Cage | Wayfire | GameScope | Jay | Mir | Treeland | Louvre | |
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
zcosmic_overlap_notify_v1 | x | x | x | 1 | x | x | x | x | x | x | x | x | x | x | x |
Copyright
Copytight © 2024 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.