-
Notifications
You must be signed in to change notification settings - Fork 2.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
wayland: set_cursor_visibility doesn't respect fractional scaling (erroring when < 1.0). #12309
Comments
I intentionally didn't use fractional scaling on the cursor since it's really stupid. Cursor themes only come in a select few sizes and the behavior with integer scaling is bad too. Cursor shape solves this so you shouldn't have this problem there (the compositor picks the cursor). However, truncating to 0 on the fallback code is definitely bad. It should be at least 1. Does this patch fix it?
|
Sorry totally forgot about this... give me a second. |
Same, I'm really sorry, completely lost track of it! You can even reproduce their bugginess in a vacuum (as long as you're on Wayland): $ google-chrome-stable --version
Google Chrome 118.0.5993.88
$ google-chrome-stable --disable-features=WaylandFractionalScaleV1 --force-device-scale-factor=0.99
$ google-chrome-stable --disable-features=WaylandFractionalScaleV1 --force-device-scale-factor=1.01
|
Important Information
Provide following Information:
23.11pre520402.e7f38be3775b
)kwin_wayland
5.27.7)Reproduction steps
There may be visual issues at all scales, but to get the error:
1.0
(I use
0.75
on 1440p side monitors, with the primary 4K monitor kept at1.0
)mpv
on a monitor with scale below1.0
(or move its window there)(I used
mpv --no-config --pause av://lavfi:color
below for the repro)mpv
windowExpected behavior
mpv
should be able to show/hide the cursor correctly.Actual behavior
mpv
causes this wayland error and quits:Passing
--cursor-autohide=always
bypasses the problem, but it's not a great workaround since it makes operating the OSD difficult (it does, however, make me strongly suspectset_cursor_visibility
- see below).This appears to be the relevant code:
mpv/video/out/wayland_common.c
Lines 1749 to 1764 in 998c3a1
Using
wl->scaling
(adouble
) as an integer will round towards0
, and produce0
from e.g.0.75
.The only other caller of
wl_surface_set_buffer_scale
checks for fractional scaling:mpv/video/out/wayland_common.c
Lines 1828 to 1831 in 998c3a1
Log file
Output of
WAYLAND_DEBUG=1 mpv --no-config --pause av://lavfi:color -v -v >log.txt 2>&1
: https://0x0.st/Hpj0.txtThe text was updated successfully, but these errors were encountered: