diff options
author | Dudemanguy <random342@airmail.cc> | 2021-08-10 13:41:42 -0500 |
---|---|---|
committer | Dudemanguy <random342@airmail.cc> | 2021-08-10 15:37:49 -0500 |
commit | 577ca780b49eebb7e8bddeb3ebff15af6bab5606 (patch) | |
tree | f9380c2f7d739b211f56b86178905a0892ed34e1 | |
parent | 8a597a484bbc121b64fdb5a118032136b3d9f1ba (diff) | |
download | mpv-577ca780b49eebb7e8bddeb3ebff15af6bab5606.tar.bz2 mpv-577ca780b49eebb7e8bddeb3ebff15af6bab5606.tar.xz |
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.
-rw-r--r-- | video/out/wayland_common.c | 2 |
1 files changed, 2 insertions, 0 deletions
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, |