From 577ca780b49eebb7e8bddeb3ebff15af6bab5606 Mon Sep 17 00:00:00 2001 From: Dudemanguy Date: Tue, 10 Aug 2021 13:41:42 -0500 Subject: 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. --- video/out/wayland_common.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/video/out/wayland_common.c b/video/out/wayland_common.c index 8fb43cc10c..3f589538cb 100644 --- a/video/out/wayland_common.c +++ b/video/out/wayland_common.c @@ -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, -- cgit v1.2.3