xdg_decoration_theme_v1

manager for window theme synchronization

This global interface allows clients to inform the compositor of their current light or dark theme preference.

The compositor may use this information to render matching decorations consistent with the client's theme.

destroy()
destroy the theme manager object
get_toplevel_theme(id: new_id<zxdg_toplevel_theme_v1>, toplevel: object<xdg_toplevel>)
Argument
Type
Description
idnew_id<zxdg_toplevel_theme_v1>
toplevelobject<xdg_toplevel>
create a theme object associated with an xdg_toplevel

Create a new decoration theme object associated with a given xdg_toplevel. The theme object is used to notify the compositor when the client changes between light and dark modes.


theme object for a toplevel surface

The toplevel theme object allows a client to notify the compositor of its active color theme.

The compositor should not enforce the client's theme, but may adjust decoration colors to match the client's preference.

destroy()
destroy the theme object
Argument
Type
Description
themeuint<zxdg_toplevel_theme_v1.theme>
current theme mode
notify compositor of current theme

Notify the compositor that the client is currently using the specified theme mode. The compositor may use this information to adjust the color of decorations for this toplevel.

This request can be sent any time, such as when the user toggles between light and dark modes.

theme { light, dark } 
Argument
Value
Description
light1
client currently uses light theme
dark2
client currently uses dark theme

Compositor Support

No compositor support found

Copyright © 2025 YaoBing Xiao

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.