From 36f37793dd6272668ad214d9bb67729fc09d4a42 Mon Sep 17 00:00:00 2001 From: probonopd Date: Sun, 30 Mar 2025 08:41:15 +0000 Subject: [PATCH] ext-toplevel-placement --- meson.build | 1 + .../ext-toplevel-placement-v1.xml | 138 ++++++++++++++++++ 2 files changed, 139 insertions(+) create mode 100644 staging/ext-toplevel-placement/ext-toplevel-placement-v1.xml diff --git a/meson.build b/meson.build index af4b264..b4a5259 100644 --- a/meson.build +++ b/meson.build @@ -56,6 +56,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'], 'fifo': ['v1'], 'fractional-scale': ['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..c705097 --- /dev/null +++ b/staging/ext-toplevel-placement/ext-toplevel-placement-v1.xml @@ -0,0 +1,138 @@ + + + + + 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 + global or the creation of placement objects via `get_placement` + to privileged clients based on its internal policy. This policy might involve + checking the client's identity (e.g., via app_id or executable path) + against a configured list of trusted clients configurable by the user. + This is compositor policy. + + + + + + + + + Attempt to create an ext_toplevel_placement_v1 interface for a given + xdg_toplevel. + + The compositor MUST apply its policy to determine if the client is + authorized. If the client is not authorized according to compositor policy, + the compositor MUST send the `permission_denied` error and MUST NOT + create the object. 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 a privileged client to suggest an initial placement + position for its associated xdg_toplevel window, specified using absolute logical + coordinates relative to a specific wl_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 wl_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 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. + + 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. + + + + + + + + + + + + bind the ext_toplevel_placement_manager_v1 global + + + + + + + \ No newline at end of file