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.
This commit is contained in:
Dudemanguy 2020-01-11 19:36:55 -06:00
parent b8a42cc41c
commit a870145fb9
1 changed files with 6 additions and 0 deletions

View File

@ -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;