diff options
author | Emmanuel Gil Peyrot <linkmauve@linkmauve.fr> | 2016-05-08 18:30:10 +0100 |
---|---|---|
committer | wm4 <wm4@nowhere> | 2016-05-08 19:47:08 +0200 |
commit | f99e48ae6a73129385576d66e7b37965d7862b3b (patch) | |
tree | dd0c355f4435a1b6db98d18b149a05f982cc804f /video | |
parent | 7d9eab15f00e38a5b4c25d084a904e3a8439807b (diff) | |
download | mpv-f99e48ae6a73129385576d66e7b37965d7862b3b.tar.bz2 mpv-f99e48ae6a73129385576d66e7b37965d7862b3b.tar.xz |
wayland: use the advertised size in fullscreen
When we receive the wl_shell_surface::configure event, it makes sense
to respect the aspect ratio of the video in windowed mode, but in
fullscreen it forces compositing and wastes resources (until atomic
modesetting is available everywhere and we can stop having
desynchronised planes).
Weston mitigates a resolution mismatch by creating black surfaces and
compositing them around the fullscreen surface, placed at the middle,
while GNOME puts it at the top-left and leaves the rest of the desktop
composited below, both of them producing a subpar experience.
Fixes #3021, #2657.
Diffstat (limited to 'video')
-rw-r--r-- | video/out/wayland_common.c | 7 |
1 files changed, 0 insertions, 7 deletions
diff --git a/video/out/wayland_common.c b/video/out/wayland_common.c index b9dac9049c..817e77102b 100644 --- a/video/out/wayland_common.c +++ b/video/out/wayland_common.c @@ -739,7 +739,6 @@ static void schedule_resize(struct vo_wayland_state *wl, { int32_t minimum_size = 150; int32_t x, y; - float temp_aspect = width / (float) MPMAX(height, 1); float win_aspect = wl->window.aspect; if (win_aspect <= 0) win_aspect = 1; @@ -770,12 +769,6 @@ static void schedule_resize(struct vo_wayland_state *wl, case WL_SHELL_SURFACE_RESIZE_BOTTOM_RIGHT: height = (1 / win_aspect) * width; break; - default: - if (wl->window.aspect < temp_aspect) - width = wl->window.aspect * height; - else - height = (1 / win_aspect) * width; - break; } if (edges & WL_SHELL_SURFACE_RESIZE_LEFT) |