wayland: request xdg-decoration mode on startup

Right after the listener is constructed, request a mode based on the
value of the border option. If border, then request SSD. If no border,
request CSD. The decoration listener handles it from there.
This commit is contained in:
Dudemanguy 2021-08-10 13:41:42 -05:00
parent 8a597a484b
commit 577ca780b4
1 changed files with 2 additions and 0 deletions

View File

@ -1729,6 +1729,8 @@ int vo_wayland_init(struct vo *vo)
if (wl->xdg_decoration_manager) {
wl->xdg_toplevel_decoration = zxdg_decoration_manager_v1_get_toplevel_decoration(wl->xdg_decoration_manager, wl->xdg_toplevel);
zxdg_toplevel_decoration_v1_add_listener(wl->xdg_toplevel_decoration, &decoration_listener, wl);
// The enum in xdg-decoration starts at 1.
zxdg_toplevel_decoration_v1_set_mode(wl->xdg_toplevel_decoration, opts->border + 1);
} else {
wl->vo_opts->border = false;
m_config_cache_write_opt(wl->vo_opts_cache,