From a870145fb9c3ecdb2a5daf09e24586ca16b1e58a Mon Sep 17 00:00:00 2001 From: Dudemanguy Date: Sat, 11 Jan 2020 19:36:55 -0600 Subject: wayland: support maximize/minimize on startup Allow the --window-maximized and --window-minimized flags to actually work when the player is started on wayland. If the compositor doesn't support maximization or minimization, then these options just do nothing. --- video/out/wayland_common.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/video/out/wayland_common.c b/video/out/wayland_common.c index 3be85012df..01a44e8abe 100644 --- a/video/out/wayland_common.c +++ b/video/out/wayland_common.c @@ -1314,6 +1314,12 @@ int vo_wayland_reconfig(struct vo *vo) } } + if (wl->vo_opts->window_maximized) + xdg_toplevel_set_maximized(wl->xdg_toplevel); + + if (wl->vo_opts->window_minimized) + xdg_toplevel_set_minimized(wl->xdg_toplevel); + wl_surface_set_buffer_scale(wl->surface, wl->scaling); wl_surface_commit(wl->surface); wl->pending_vo_events |= VO_EVENT_RESIZE; -- cgit v1.2.3