diff --git a/meson.build b/meson.build index ff4f32b..5291bb2 100644 --- a/meson.build +++ b/meson.build @@ -59,6 +59,7 @@ staging_protocols = { 'ext-image-capture-source': ['v1'], 'ext-image-copy-capture': ['v1'], 'ext-session-lock': ['v1'], + 'ext-toplevel-placement': ['v1'], 'ext-transient-seat': ['v1'], 'ext-workspace': ['v1'], 'fifo': ['v1'], diff --git a/staging/ext-toplevel-placement/ext-toplevel-placement-v1.xml b/staging/ext-toplevel-placement/ext-toplevel-placement-v1.xml new file mode 100644 index 0000000..ea443a0 --- /dev/null +++ b/staging/ext-toplevel-placement/ext-toplevel-placement-v1.xml @@ -0,0 +1,145 @@ + + + + + Copyright © 2025 The Wayland Authors + + Permission is hereby granted, free of charge, to any person obtaining a + copy of this software and associated documentation files (the "Software"), + to deal in the Software without restriction, including without limitation + the rights to use, copy, modify, merge, publish, distribute, sublicense, + and/or sell copies of the Software, and to permit persons to whom the + Software is furnished to do so, subject to the following conditions: + + The above copyright notice and this permission notice (including the next + paragraph) shall be included in all copies or substantial portions of the + Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL + THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING + FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER + DEALINGS IN THE SOFTWARE. + + + + + This interface is a manager used to create placement suggestion objects + for xdg_toplevels. + + The compositor may choose to restrict the availability of this manager + based on its internal policy. This might involve checking the client's + identity (e.g., via app_id or executable path) against a list of trusted + clients configurable by the user. + + + + + + + + + + Attempt to create an ext_toplevel_placement_v1 interface for a given + xdg_toplevel. + + If the toplevel already has a placement object, + the compositor MUST send the `placement_exists` error. + + This interface can only be obtained once per xdg_toplevel. + + + + + + + + + + + + + This interface allows trusted clients to suggest an initial placement + position for its associated xdg_toplevel window, specified using absolute logical + coordinates relative to a specific xdg_output. + + Access to create and use this interface is subject to compositor policy. + + The suggested placement is only a hint. The compositor retains full + authority to determine the final window position. Clients must + monitor configure events to determine the actual final placement. + + + + + + + + + Suggests an initial placement position (x, y) for the associated xdg_toplevel. + The coordinates are in logical pixels, relative to the top-left corner + of the specified xdg_output's logical area. + + This request serves as a hint to the compositor. The compositor MAY ignore + this hint entirely or modify the outcome based on its state or policies. + The client MUST NOT assume the suggestion will be honored precisely. + + This suggestion is primarily intended for *initial* placement and should + ideally be sent before the first wl_surface.commit that maps the window. + Compositors are unlikely to substantially alter placement based on + suggestions sent after the window is already mapped and positioned. + + This request causes the compositor to send `placement_state`, including + the output and logical coordinates where the toplevel is currently placed, + or `not_placed`. + + + + + + + + + Requests the compositor to send the current placement state, including + the output and logical coordinates where the toplevel is currently placed. + + + + + + This event notifies the client of the output and logical position where + the compositor has actually placed the window, typically sent during + the initial configuration sequence after considering any placement + suggestions, and in response to a `get_placement_state` request. + + This allows the client to know the result of its suggestion and update + its stored state accurately. Compositors are not required to send this + event if no suggestion was made or considered relevant to the final + placement decision. + + Standard xdg_toplevel.configure events remain the primary source for + ongoing size, state, and potentially position updates. + + + + + + + + + This event is sent if the compositor *cannot* place the toplevel window + *as suggested*. This might be due to various reasons like no suitable output, + geometry conflicts, or unresolvable policy restrictions *after considering the suggestion*. + Receiving this event implies that the compositor will *not* honor the + placement suggestion and the toplevel might not be placed at all, or will be + placed using a fallback mechanism unrelated to the suggestion. + + + + + + + \ No newline at end of file