Copyright © 2026 Window Maker Team 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 protocol allows Window Maker WINGs clients (such as WPrefs) to request specific screen positions for borderless popup-style toplevel windows (menu editor items, popup dropdown menus, tear-off menus). Standard xdg_shell does not allow clients to position toplevels — only the compositor decides placement. This is correct for normal application windows but breaks WINGs UI patterns that require client-driven positioning (e.g., a dropdown menu must appear directly below its triggering button). A client wraps an xdg_toplevel with a wmaker_popup object and calls set_position(x, y) before the surface is mapped. The compositor honours the position when the surface becomes visible. Subsequent set_position calls reposition the surface immediately. The popup loses no other xdg_toplevel features — it remains an ordinary toplevel for input, focus, and lifetime purposes. The compositor is additionally expected to omit decorations and skip taskbar/dock listing for popup-wrapped toplevels (typically signalled via app_id). Singleton global advertised by Window Maker compositors that support client-driven popup positioning. Clients bind once and use it to wrap xdg_toplevel objects. Destroy the manager. Existing wmaker_popup objects remain valid. Wrap the given xdg_toplevel in a wmaker_popup object so the client can drive its position. The toplevel must not yet be mapped. Calling get_popup more than once for the same toplevel is a protocol error. Wrapper around an xdg_toplevel that lets the client drive screen placement. Position is in coordinates relative to the parent toplevel's top-left corner, or compositor-global if no parent is set. The parent is set via set_parent() and is typically the application's main toplevel (e.g., the WPrefs main window). Destroying the popup reverts the toplevel to compositor-driven placement. The underlying xdg_toplevel remains valid until the client destroys it explicitly. Subsequent set_position calls are interpreted as offsets from the parent toplevel's top-left corner. Pass NULL to revert to compositor-global coordinates. Place the popup at (x, y). If a parent has been set via set_parent, coordinates are relative to the parent's top-left corner. Otherwise, coordinates are compositor-global. Takes effect on the next surface commit if the toplevel is not yet mapped, or immediately if already mapped.