treeland_region_watch_unstable_v1 ↗
Copyright
SPDX-FileCopyrightText: 2024 - 2026 UnionTech Software Technology Co., Ltd. SPDX-License-Identifier: MIT
- treeland_region_watch_manager_v1 — factory for region watchers
- treeland_region_watch_v1 — overlap watcher for an edge-anchored region
edge-anchored region overlap watch for treeland
Warning! This protocol is EXPERIMENTAL and under active development. It may change at any time, including in backward-incompatible ways, without incrementing the interface major version and without prior notice. No compatibility guarantees of any kind are provided. Clients and compositors must track the upstream definition in treeland-protocols and must not rely on the current interface names, requests, events, or semantics remaining stable across releases.
This protocol allows a privileged DDE client such as the dock to monitor whether a region anchored to an edge of an output overlaps with any xdg-shell toplevel window, for example to implement smart panel hiding.
The compositor must reject bind attempts from non-privileged clients.
The terms "must", "must not", "should", and "may" in this document are to be interpreted as described in RFC 2119.
treeland_region_watch_unstable_v1
treeland_region_watch_manager_v1
- destroy — destroy the manager
- get_region_watch — create a new region watcher
factory for region watchers
A global that creates treeland_region_watch_v1 objects for privileged DDE clients. Each watcher monitors one region; clients monitoring several regions create several watchers.
The compositor must reject bind attempts from non-privileged clients.
treeland_region_watch_unstable_v1
treeland_region_watch_v1
- anchor — output edge the region is anchored to
- error — region watcher errors
- destroy — destroy the region watcher
- set_region — set the monitored region
- enter — the region is overlapped
- leave — the region is no longer overlapped
- output_removed — the associated output has been destroyed
overlap watcher for an edge-anchored region
A watcher object monitors whether a rectangular region anchored to an edge of an output overlaps with any xdg-shell toplevel window.
The client registers the monitored region with the set_region request and the compositor reports transitions between the overlapped and clear states with the enter and leave events. The recorded region only changes when set_region is called; the client must call set_region again whenever the monitored panel moves or resizes.
After each set_region request the compositor must evaluate the region against the current window layout and send the matching enter or leave event; afterwards it should send these events only when the overlap state changes.
The watcher is associated with the wl_output passed to the last set_region request. When that output is destroyed the compositor sends the output_removed event; the watcher then becomes inert: it has no monitored region and sends no further enter or leave events. The watcher object itself is not destroyed by output removal; the client may call set_region again with another wl_output to resume monitoring, or call destroy to release it. The compositor must not send enter, leave, or output_removed after output_removed until the next successful set_region.
The client may release the wl_output proxy passed to set_region at any time after the request returns; the compositor holds its own reference and the watcher remains associated with that output until either the output is destroyed (triggering output_removed) or a subsequent set_region rebinds to a different output.