summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDudemanguy <random342@airmail.cc>2020-01-11 19:36:55 -0600
committerDudemanguy <random342@airmail.cc>2020-01-12 16:12:09 +0000
commita870145fb9c3ecdb2a5daf09e24586ca16b1e58a (patch)
treeb4f0c520470d7a4ebe04ba9517e4214d5fa6f290
parentb8a42cc41c2733c95feda35929a9099e68c32571 (diff)
downloadmpv-a870145fb9c3ecdb2a5daf09e24586ca16b1e58a.tar.bz2
mpv-a870145fb9c3ecdb2a5daf09e24586ca16b1e58a.tar.xz
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.
-rw-r--r--video/out/wayland_common.c6
1 files changed, 6 insertions, 0 deletions
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;