zxdg_toplevel_decoration_v1¤
wayland.zxdg_toplevel_decoration_v1 ¤
Decoration object for a toplevel surface
The decoration object allows the compositor to toggle server-side window decorations for a toplevel surface. The client can request to switch to another mode.
The xdg_toplevel_decoration object must be destroyed before its xdg_toplevel.
Methods:
-
destroy
–Destroy the decoration object
-
set_mode
–Set the decoration mode
-
unset_mode
–Unset the decoration mode
-
on_configure
–Notify a decoration mode change.
error ¤
-
unconfigured_buffer
–`xdg_toplevel` has a buffer attached before configure -
already_constructed
–`xdg_toplevel` already has a decoration object -
orphaned
–`xdg_toplevel` destroyed before the decoration object -
invalid_mode
–Invalid mode
mode ¤
Window decoration modes
These values describe window decoration modes.
-
client_side
–No server-side window decoration -
server_side
–Server-side window decoration
events
configure ¤
Notify a decoration mode change
The configure event configures the effective decoration mode. The configured state should not be applied immediately. Clients must send an ack_configure in response to this event. See xdg_surface.configure and xdg_surface.ack_configure for details.
A configure event can be sent at any time. The specified mode must be obeyed by the client.
Parameters:
destroy ¤
destroy() -> None
Destroy the decoration object
Switch back to a mode without any server-side decorations at the next commit.
set_mode ¤
Set the decoration mode
Set the toplevel surface decoration mode. This informs the compositor that the client prefers the provided decoration mode.
After requesting a decoration mode, the compositor will respond by emitting an xdg_surface.configure event. The client should then update its content, drawing it without decorations if the received mode is server-side decorations. The client must also acknowledge the configure when committing the new content (see xdg_surface.ack_configure).
The compositor can decide not to use the client's mode and enforce a different mode instead.
Clients whose decoration mode depend on the xdg_toplevel state may send a set_mode request in response to an xdg_surface.configure event and wait for the next xdg_surface.configure event to prevent unwanted state. Such clients are responsible for preventing configure loops and must make sure not to send multiple successive set_mode requests with the same decoration mode.
If an invalid mode is supplied by the client, the invalid_mode protocol error is raised by the compositor.
Parameters:
unset_mode ¤
unset_mode() -> None
Unset the decoration mode
Unset the toplevel surface decoration mode. This informs the compositor that the client doesn't prefer a particular decoration mode.
This request has the same semantics as set_mode.
on_configure ¤
on_configure(mode: mode) -> None
Notify a decoration mode change.
Override to handle wayland.zxdg_toplevel_decoration_v1.events.configure
.