summaryrefslogtreecommitdiffstats
path: root/video/out
diff options
context:
space:
mode:
authorDudemanguy <random342@airmail.cc>2022-06-06 15:13:07 -0500
committerDudemanguy <random342@airmail.cc>2022-06-06 15:13:07 -0500
commitcd3b4edea06dec659d9676f2649cc1b1be2e8565 (patch)
treed399abfec5ac6932e1e307e877d2329e0bb056d6 /video/out
parent969bdf5f4149971d8c16e9ab2b4f399c735115f5 (diff)
downloadmpv-cd3b4edea06dec659d9676f2649cc1b1be2e8565.tar.bz2
mpv-cd3b4edea06dec659d9676f2649cc1b1be2e8565.tar.xz
wayland: remove some unneeded lines from reconfig
Just a couple of small changes. First, the obvious one is to remove the bogus wl->window_size = wl->vdparams; line in the configure conditional. The reconfig always unconditionally sets the window_size here so there's no need to duplicate it. The more important change is to remove the usage of set_surface_scaling. This function is just to handle when scaling changes and for setting the initial scale, it was called in the reconfig. This, however, causes some weird issues in the latest sway/wlroots where it can try to divide a buffer by an inappropriate scale factor. This is possibly due to some weird ordering of events and only occured in opengl for some reason. Luckily, it turns it out it's not neccessary to set the scaling here at all. The surface enter event is already setup to handle scale changes. On an HIDPI display, mpv will initially assume a scale of 1 but the surface actually enters the wl_output, it will automatically readjust and resize itself to the appropriate scale value. This works on the initial launch of the mpv window as well, so there's no need to special case this in the reconfig event. This has the nice bonus of avoiding that sway/wlroots issue as well since the buffer_scale is set much later. Fixes #10263.
Diffstat (limited to 'video/out')
-rw-r--r--video/out/wayland_common.c2
1 files changed, 0 insertions, 2 deletions
diff --git a/video/out/wayland_common.c b/video/out/wayland_common.c
index 1c8d2097c8..ac975982a7 100644
--- a/video/out/wayland_common.c
+++ b/video/out/wayland_common.c
@@ -1924,7 +1924,6 @@ int vo_wayland_reconfig(struct vo *vo)
wl->current_output = find_output(wl);
if (!wl->current_output)
return false;
- set_surface_scaling(wl);
wl_surface_commit(wl->surface);
configure = true;
}
@@ -1946,7 +1945,6 @@ int vo_wayland_reconfig(struct vo *vo)
do_minimize(wl);
if (configure) {
- wl->window_size = wl->vdparams;
wl->geometry = wl->window_size;
wl_display_roundtrip(wl->display);
wl->pending_vo_events |= VO_EVENT_DPI;