diff options
author | Dudemanguy <random342@airmail.cc> | 2021-04-14 13:52:10 -0500 |
---|---|---|
committer | Dudemanguy <random342@airmail.cc> | 2021-04-16 15:46:33 +0000 |
commit | cd7a7a1de8d8bffa05170befef25b251711c994a (patch) | |
tree | e8014bd727adb0a676082e9af0b7d89431fe6ae6 /TOOLS/lua/audio-hotplug-test.lua | |
parent | 74f5d4940e38799cb92319e89c030195c5d4fe54 (diff) | |
download | mpv-cd7a7a1de8d8bffa05170befef25b251711c994a.tar.bz2 mpv-cd7a7a1de8d8bffa05170befef25b251711c994a.tar.xz |
wayland: update geometry + cursor on output event
The wayland output listener can update whenever something about the
output changes (resolution, scale). Currently, the mpv VO updates
correctly when the refresh rate changes, but changes of both scale and
resolution were not considered. This causes a bug in certain cases like
the mouse surface not being shown at certain scale factors due to the
cursor scale not being updated correctly. Also autofit type options
would not update if the resolution changes.
To fix this, we must always reset the window geometry and wl scaling
whenever the output event occurs on wl->current_output. There is no way
to know precisely what changed from the previous state, so all of the
parameters must be reset and then resized.
As an aside, this apparently doesn't fix all cursor problem as there's
apparently a bug in libwayland-cursor(*). It's still something we should
be doing regardless.
*: https://gitlab.freedesktop.org/wayland/wayland/-/issues/194
Diffstat (limited to 'TOOLS/lua/audio-hotplug-test.lua')
0 files changed, 0 insertions, 0 deletions