mirror of
https://github.com/mpv-player/mpv
synced 2024-12-28 18:12:22 +00:00
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:
parent
8a597a484b
commit
577ca780b4
@ -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,
|
||||
|
Loading…
Reference in New Issue
Block a user