diff options
author | Dudemanguy <random342@airmail.cc> | 2021-06-28 11:03:51 -0500 |
---|---|---|
committer | Dudemanguy <random342@airmail.cc> | 2021-06-30 16:37:36 +0000 |
commit | f2afae55e95b4b1eec1aeb828ba6ff1f0695d993 (patch) | |
tree | cb8bb2abd59d938077544c1732173dae2c4fef4f /video/out/wayland_common.h | |
parent | 0c1544e66cb980bd8a1dedb13ac07904380da608 (diff) | |
download | mpv-f2afae55e95b4b1eec1aeb828ba6ff1f0695d993.tar.bz2 mpv-f2afae55e95b4b1eec1aeb828ba6ff1f0695d993.tar.xz |
wayland: refactor surface scaling
Another day, another wayland refactor. Way back when, dcc3c2e added
support for the hidpi-window-scale option (something you probably should
never set to no but whatever) to wayland. Well technically, it never had
any runtime toggling support (don't remember if detecting when vo_opts
changed was possible or not then; maybe not). Anyways in the process of
fixing that, I went ahead and refactored how this is all handled. The
key difference is that when hidpi-window-scale is disabled, wl->scaling
is directly set to 1 instead of forcibly setting
wl->current_output->scale to 1. Note that scaling operations don't
always require a geometry reset/resize so set_surface_scaling needs to
be separate from set_geometry. The logic here is kind of complicated but
it (should) be correct.
Diffstat (limited to 'video/out/wayland_common.h')
-rw-r--r-- | video/out/wayland_common.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/video/out/wayland_common.h b/video/out/wayland_common.h index 9d8c514d47..b77bab462b 100644 --- a/video/out/wayland_common.h +++ b/video/out/wayland_common.h @@ -59,6 +59,7 @@ struct vo_wayland_state { bool focused; bool frame_wait; bool hidden; + bool scale_change; bool state_change; bool toplevel_configured; int display_fd; |