diff options
author | Alexander Preisinger <alexander.preisinger@gmail.com> | 2014-09-10 19:20:56 +0200 |
---|---|---|
committer | Alexander Preisinger <alexander.preisinger@gmail.com> | 2014-09-10 19:21:52 +0200 |
commit | 369868e40434277bd909479f294a4a219ee3bd67 (patch) | |
tree | 83ca03f5d296e84a57b5032ee24f0860a92c67ff | |
parent | 94fe57856dd8f42b62c5c28715a817196c22926d (diff) | |
download | mpv-369868e40434277bd909479f294a4a219ee3bd67.tar.bz2 mpv-369868e40434277bd909479f294a4a219ee3bd67.tar.xz |
wayland_common: fix changing videos when fullscreen
I broke it again.
-rw-r--r-- | video/out/wayland_common.c | 17 | ||||
-rw-r--r-- | video/out/wayland_common.h | 1 |
2 files changed, 3 insertions, 15 deletions
diff --git a/video/out/wayland_common.c b/video/out/wayland_common.c index 842e649812..f5f662ec3c 100644 --- a/video/out/wayland_common.c +++ b/video/out/wayland_common.c @@ -1201,20 +1201,9 @@ bool vo_wayland_config (struct vo *vo, uint32_t flags) wl->window.aspect = vo->dwidth / (float) MPMAX(vo->dheight, 1); if (!(flags & VOFLAG_HIDDEN)) { - if (!wl->window.is_init) { - wl->window.width = vo->dwidth; - wl->window.height = vo->dheight; - } - - if (vo->opts->fullscreen) { - if (wl->window.is_fullscreen) - schedule_resize(wl, 0, wl->window.fs_width, wl->window.fs_height); - else - vo_wayland_fullscreen(vo); - } - else - vo_wayland_ontop(vo); - wl->window.is_init = true; + wl->window.width = vo->dwidth; + wl->window.height = vo->dheight; + vo_wayland_fullscreen(vo); } return true; diff --git a/video/out/wayland_common.h b/video/out/wayland_common.h index 86af54be45..5f0947f47d 100644 --- a/video/out/wayland_common.h +++ b/video/out/wayland_common.h @@ -95,7 +95,6 @@ struct vo_wayland_state { int32_t sh_y; float aspect; - bool is_init; // true if the window has a valid size bool is_fullscreen; // don't keep aspect ratio in fullscreen mode int32_t fs_width; // fullscreen sizes int32_t fs_height; |