summaryrefslogtreecommitdiffstats
path: root/TOOLS
diff options
context:
space:
mode:
authorDudemanguy <random342@airmail.cc>2024-04-09 11:34:15 -0500
committerDudemanguy <random342@airmail.cc>2024-04-14 17:09:31 +0000
commit895f40e150d4bf2261a96fc2586d75f998d2ac5d (patch)
treec5cef37337bd872d309d14ab9ea949d6e7e39c19 /TOOLS
parent367d02e971bee27940da2f8629eb2a625d5e9bb1 (diff)
downloadmpv-895f40e150d4bf2261a96fc2586d75f998d2ac5d.tar.bz2
mpv-895f40e150d4bf2261a96fc2586d75f998d2ac5d.tar.xz
wayland: only perform a rescale if window is on one output
The mpv window overlapping multiple outputs with different scale values can result in some weird behavior when dragging it from one monitor to another one. This is due to the way some compositors implement preferred_scale or preferred_buffer_scale (integer scale equivalent). Depending on the scale values, mpv window has to be resized to match the new scaling value (due to fractional scaling requiring a viewport). This can cause the window to become smaller and no longer overlap the monitor you were just trying to drag it to. Repeat this and the window will become smaller and smaller. Depending on the layout, the reverse can also happen (the window becomes larger). This can cause additional events to fire as the preferred_scale value may change again which does more weird things. It seems kwin is not affected by this because their implementation of preferred_scale sends the event only if the window is fully on the new monitor. Honestly, this is probably more logical anyway but we should at least deal with the other implementations better. Try to deal with it by reworking scaling changes so they only occur when the mpv window is fully on one monitor. If we get a preferred_scale event and there is an overlap, save it as a pending change to be performed on the next surface_enter or surface_leave event (whichever results in there being only one monitor. Some weird rendering glitches can still happen during overlap but this makes it usable again.
Diffstat (limited to 'TOOLS')
0 files changed, 0 insertions, 0 deletions