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 committed 2021-08-10 15:37:49 -05:00
1 parent 8a597a484b
commit 577ca780b4
1 file changed
+2
+2
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,