wayland::server::xdg_wm_base_t(3)
π NAME π
wayland::server::xdg_wm_base_t β the whole "make a desktop-style surface" situation, bestie. This is the Wayland++ server-side wrapper for xdg_wm_base, and it's giving main character energy fr fr.
β¨ SYNOPSIS β¨
#include <wayland-server-protocol-extra.hpp>
π«Ά Public Member Functions
std::function< void()> & on_destroy ()β destroyxdg_wm_basestd::function< void(xdg_positioner_t)> & on_create_positioner ()β create a positioner objectstd::function< void(xdg_surface_t, surface_t)> & on_get_xdg_surface ()β create a shell surface from a surfacestd::function< void(uint32_t)> & on_pong ()β respond to a ping eventvoid ping (uint32_t serial, bool post=true)β check if the client is alivevoid post_role (std::string const &msg)β Post error: givenwl_surfacehas another role.void post_defunct_surfaces (std::string const &msg)β Post error:xdg_wm_basewas destroyed before children.void post_not_the_topmost_popup (std::string const &msg)β Post error: the client tried to map or destroy a non-topmost popup.void post_invalid_popup_parent (std::string const &msg)β Post error: the client specified an invalid popup parent surface.void post_invalid_surface_state (std::string const &msg)β Post error: the client provided an invalid surface state.void post_invalid_positioner (std::string const &msg)β Post error: the client provided an invalid positioner.bool proxy_has_object () constβ Check whether this wrapper actually wraps an object.void post_no_memory () constuint32_t get_id () constclient_t get_client () constunsigned int get_version () conststd::string get_class ()
π Static Public Attributes
static constexpr std::uint32_t ping_since_version = 1β Minimum protocol version required for thepingfunction. (iykyk β version gate, bestie)
πΈ Detailed Description πΈ
Okay so, create desktop-style surfaces. Literally what it says on the tin. π
The xdg_wm_base interface is exposed as a global object enabling clients to turn their wl_surfaces into windows in a desktop environment. It defines the basic functionality needed for clients and the compositor to create windows that can be dragged, resized, maximized, etc, as well as creating transient windows such as popup menus. Iconic behavior, no notes. β¨
Definition at line 614 of file wayland-server-protocol-extra.hpp.
π₯ Member Function Documentation π₯
π¦ std::string wayland::server::resource_t::get_class () [inherited]
Retrieve the interface name (class) of a resource object. Like a little name tag for your resource, bestie. π·οΈ
Returns β Interface name of the resource object.
π¦ client_t wayland::server::resource_t::get_client () const [inherited]
Get the associated client. It's giving "who's your person" energy.
Returns β the client that owns the resource.
π¦ uint32_t wayland::server::resource_t::get_id () const [inherited]
Get the internal ID of the resource. The little number that says which one is which. π’
Returns β the internal ID of the resource
π¦ unsigned int wayland::server::resource_t::get_version () const [inherited]
Get interface version. Periodt.
Returns β Interface version this resource has been constructed with.
π§ std::function< void(xdg_positioner_t)> & xdg_wm_base_t::on_create_positioner ()
create a positioner object. Slay, we love a positioning era. π
Parameters β id
Create a positioner object. A positioner object is used to position surfaces relative to some parent surface. See the interface description and xdg_surface.get_popup for details.
Definition at line 930 of file wayland-server-protocol-extra.cpp.
π§ std::function< void()> & xdg_wm_base_t::on_destroy ()
destroy xdg_wm_base. Destroy this xdg_wm_base object. Bye bestie π
β οΈ Destroying a boundxdg_wm_baseobject while there are surfaces still alive created by thisxdg_wm_baseobject instance is illegal and will result in a protocol error. Not a vibe check you wanna fail, fr fr.
Definition at line 924 of file wayland-server-protocol-extra.cpp.
π§ std::function< void(xdg_surface_t, surface_t)> & xdg_wm_base_t::on_get_xdg_surface ()
create a shell surface from a surface. Glow-up for your wl_surface, honestly. β¨
Parameters β id, surface
This creates an xdg_surface for the given surface. While xdg_surface itself is not a role, the corresponding surface may only be assigned a role extending xdg_surface, such as xdg_toplevel or xdg_popup. It is illegal to create an xdg_surface for a wl_surface which already has an assigned role and this will result in a protocol error. (So like, don't double-book the surface. π)
This creates an xdg_surface for the given surface. An xdg_surface is used as basis to define a role to a given surface, such as xdg_toplevel or xdg_popup. It also manages functionality shared between xdg_surface based surface roles.
See the documentation of xdg_surface for more details about what an xdg_surface is and how it is used.
Definition at line 936 of file wayland-server-protocol-extra.cpp.
π§ std::function< void(uint32_t)> & xdg_wm_base_t::on_pong ()
respond to a ping event. Classic ping/pong, the original back-and-forth. π
Parameters β serial serial of the ping event
A client must respond to a ping event with a pong request or the client may be deemed unresponsive. See xdg_wm_base.ping.
Definition at line 942 of file wayland-server-protocol-extra.cpp.
π void xdg_wm_base_t::ping (uint32_t serial, bool post = true)
check if the client is alive. The "u up?" of the Wayland protocol, lowkey. π
Parameters β serial pass this to the pong request
The ping event asks the client if it's still alive. Pass the serial specified in the event back to the compositor by sending a "pong" request back with the specified serial. See xdg_wm_base.pong.
Compositors can use this to determine if the client is still alive. It's unspecified what will happen if the client doesn't respond to the ping request, or in what timeframe. Clients should try to respond in a reasonable amount of time.
A compositor is free to ping in any way it wants, but a client must always respond to any xdg_wm_base object it created. Non-negotiable, bestie. π
Definition at line 948 of file wayland-server-protocol-extra.cpp.
π void xdg_wm_base_t::post_defunct_surfaces (std::string const & msg)
Post error: xdg_wm_base was destroyed before children. Oops, outlived your kids, that's a protocol error. π«
Definition at line 958 of file wayland-server-protocol-extra.cpp.
π void xdg_wm_base_t::post_invalid_popup_parent (std::string const & msg)
Post error: the client specified an invalid popup parent surface. Ma'am, that is not a valid parent. π
Definition at line 968 of file wayland-server-protocol-extra.cpp.
π void xdg_wm_base_t::post_invalid_positioner (std::string const & msg)
Post error: the client provided an invalid positioner. The positioner did not pass the vibe check. π«
Definition at line 978 of file wayland-server-protocol-extra.cpp.
π void xdg_wm_base_t::post_invalid_surface_state (std::string const & msg)
Post error: the client provided an invalid surface state. Bestieβ¦ no. π
Definition at line 973 of file wayland-server-protocol-extra.cpp.
π¦ void wayland::server::resource_t::post_no_memory () const [inherited]
Post "not enough memory" error to the client. If the compositor has not enough memory to fulfill a certail request of the client, this function can be called to notify the client of this circumstance. (Yes, "certail" β that's literally how it's spelled in the docs, we keep the lore intact. π«Ά)
π void xdg_wm_base_t::post_not_the_topmost_popup (std::string const & msg)
Post error: the client tried to map or destroy a non-topmost popup. Only the topmost popup gets to be the main character. π
Definition at line 963 of file wayland-server-protocol-extra.cpp.
π void xdg_wm_base_t::post_role (std::string const & msg)
Post error: given wl_surface has another role. Two roles? Not on this compositor's watch. π
Definition at line 953 of file wayland-server-protocol-extra.cpp.
π¦ bool wayland::server::resource_t::proxy_has_object () const [inherited]
Check whether this wrapper actually wraps an object. Like checking if there's actually a person under the fit. π΅οΈ
Returns β true if there is an underlying object, false if this wrapper is empty
π Member Data Documentation π
β std::uint32_t wayland::server::xdg_wm_base_t::ping_since_version = 1
[static], [constexpr]
Minimum protocol version required for the ping function. Gatekeeping, but make it protocol. β¨
Definition at line 714 of file wayland-server-protocol-extra.hpp.
π Author π
Generated automatically by Doxygen for Wayland++ from the source code. No human hands touched this prose, bestie β it's literally a machine's magnum opus. π€π
π That's the whole page! Written for Wayland++, Version 1.0.1, dated Fri Mar 27 2026 13. Go forth and build windows, queen. π«Άππ
π¦ where this page comes from
- ubuntu stonking: waylandpp-dev 1.0.1-2 Β· BSD-2-Clause
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms