-
Notifications
You must be signed in to change notification settings - Fork 69
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
Mouse cursor position is freezed at last detected position when quickly moving mouse cursor out of mpv window #1000
Comments
I can't reproduce. Maybe I don't 100% get what you're describing. Video of it happening would help. But either way, I'd guess this is an mpv issue? We just respond to cursor position events mpv sends us. |
Sorry, tried it on fresh portable and found that mpv.conf
Cannot reproduce this in default UI and ModernX.
uosc_mouse_cursor_ui_bug_video.mp4UPD: it is possible to reproduce this behaviour with hwdec=no or hwdec=dxva2 but more difficult than with hwdec=d3d11va |
Tested uosc 5.6.0 with mpv from 0.38.0 down to 0.33.0 and result is same. Probably culprit is somewhere here 4.5.0...4.6.0. Lines 548 to 556 in 5a02c6d
As for current 5.6.0 version removing cursor.hover_raw and from Line 404 in 08201fc
config used mpv.conf
|
Something like this would explain why I sometimes still have uosc elements visible despite having moved my pointer outside of the mpv window. It's not consistently reproduced, but it does occur frequently enough to be noticable. My current versions are below, but I've been seeing this for months:
|
Me neither :) That code was submitted by @christoph-heinrich to add touch support, and I'm not 100% sure what happens to touch interfaces when we remove it. I do have a touch laptop with linux on it, but it just emulates cursor, so I don't have anything to test it on. But that seems to be the culprit. From looking at it, it triggers leave only when Maybe we need to do the detection from leave to enter as well. Try changing the elseif not cursor.hidden or not cursor.hover_raw and mouse.hover then if that helps. |
I am probably doing something wrong but changing it makes UI not reacting to mouse cursor at all. By the way I am using modified cursor.lua for almost a month and did not encounter any problems.-- Movement
function handle_mouse_pos(_, mouse)
if not mouse then return end
-- if cursor.hover_raw and not mouse.hover then
if not mouse.hover then
cursor:leave()
else
cursor:move(mouse.x, mouse.y)
end
cursor.hover_raw = mouse.hover
end
mp.observe_property('mouse-pos', 'native', handle_mouse_pos) |
This would be the whole function: function handle_mouse_pos(_, mouse)
if not mouse then return end
if cursor.hover_raw and not mouse.hover then
cursor:leave()
elseif not cursor.hidden or not cursor.hover_raw and mouse.hover then
cursor:move(mouse.x, mouse.y)
end
cursor.hover_raw = mouse.hover
end |
Thank you. It is working. Tested it a little and looks like issue is fixed now. |
I've had that a few times myself, but was never able to reproduce it. Thanks for looking into it. |
How to reproduce:
video-sync=display-resample
to mpv.confMouse cursor position is fixed to monitor coordinates and not to mpv window. It can be checked by resizing mpv window which results to UI elements fading in/out, buttons highlighted, thumbfast showing thumbs etc.
screenshots
uosc 5.6.0
mpv 0.39.0
os Windows 10
The text was updated successfully, but these errors were encountered: