-
Notifications
You must be signed in to change notification settings - Fork 163
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
mpv.net breaks scripts that rely on mouse-up events #567
Comments
Thanks for the detailed bug report and sorry about the late reaction. I hope it's not too hard to fix, I understand that uosc is very popular. |
@stax76 I have the same issue, always had in fact. |
I worked on this today and think it was successful. |
I'll gladly test it if there's a test version ready to download. |
Thanks! |
I've checked the fix using the build provided in this PR, and crop.lua works without issues, unless this version is used, but that's because switching On the other hand, uosc no longer has issues when clicking on the volume bar/uosc menu. However, trying to hold and drag any of them still holds mpv.net in dragging state. While hold+drag isn't expected for uosc menu (at least i can't think of any reasons to do that, so the issue is minimal), it still creates the same problem when it comes to the volume bar. Uosc doesn't seem to rely on switching off Also, somewhat unrelated… I'm not sure if this was intentional, but changes in the newest version fixed 2 major issues i had with mpv: mpv-player/mpv#12214 and mpv-player/mpv#1921 Previously, doubleclick on mpv.net behaved differently than in mpv by going fullscreen on While mpv.net now uses |
I added support for window-dragging=no https://github.com/mpvnet-player/mpv.net/actions/runs/6656296808 What's now the biggest problem I can try to solve? I do my best to get great compatibility and mpv devs always help, but in some cases it's difficult. |
And from what i see, that PR version of crop.lua works perfectly now!
I'm personally bothered by few, but i can't think of many big ones that are exclusive to mpv.net. However, the newest update introduced some, and depending how we look at it, they might be considered as 'compatibility breaking'.
Few issues after the new
|
@stax76 Thank you for fixing the bug with UOSC... I love that I can finally use it now... However, can you bring an option to enable mpv.net context menu with UOSC? I actually prefer using it over UOSC's menu! |
mpv.net in new versions uses normal input bindings to show the context menu:
I create isolated test configurations for every mpv script I want to test, so I don't have to modify my main mpv configuration when I want to test a script. I can come back any time to any test configuration to continue testing. PowerShell code for my uosc test environment: cd $PSScriptRoot
$Env:MPV_HOME = "$PSScriptRoot"
mpvnet --quiet ../video.mkv This uosc configuration does not have an input.conf or mpv.conf file, the configuration is really minimal. When I right-click it shows the mpv.net context menu and does nothing else, so it appears to be an issue on your side. |
Yep. I had to delete my old input.conf (it was acting up) and generate a new one to fix it |
mpv.net mixes two different UI frameworks, WinForms for the main window and WPF for the main window context menu, this design still makes sense. The problem is probably caused by mixing the UI frameworks, the window and UI systems are very complex, so it's very hard to figure out why it happens and how to fix it. The problem seems to be minor, so I don't spent a lot of time trying to fix it.
That was relatively easy to fix.
I've put it back, not in the manual or menu, just the code handling the command, for backward compatibility.
I tried forwarding mouse window messages to mpv, this caused the osc to flicker and instantly hide when ever it is showed, I assumed that it is very hard to find out why it happens, so instead of forwarding mouse window messages, mpv.net sends input commands, this is the code:
Here is the documentation for the https://mpv.io/manual/master/#command-interface-[%3Cmode%3E]] For mpv frontends, such operations are probably normal, don't seem to cause problems, mpv probably logs any input command, mouse move generates a lot of commands. The reason why I remember this is I just recently did work in this area. Sometimes I look at the code of other frontends to see how they work. For the bindings and context menu issues, I created a dedicated issue: |
I close it since it mostly works now, for the remaining issues I made a feature request here. |
I only now noticed that the dragging deadzone to fix volume bar was already implemented, and that's because in
So this one is still having an issue. I'm not certain if it's possible to check that setting through mpv.net and switch the deadzone based on it, so this might require another chunk 'cut' on the left. |
In the next build (hopefully available in 1-2 days), there will also be a dead zone on the left side, regardless of installed scripts. Values are: Left: 10% I made a feature request regarding the problem on the mpv tracker here, and I explained it in the manual. |
Describe the bug
Initial discussion about this issue was created on uosc repo tomasklaen/uosc#615.
No matter the configuration, mpv.net seems to be blocking(?) mouse-up events and breaking scripts that rely on them, the mentioned uosc discussion has a video showcasing it in that case, but same issues happen in other scripts like crop.lua where the cropping action doesn't properly execute unless mpv.net is in fullscreen.
To Reproduce
Steps to reproduce the behavior:
Expected behavior
In case of uosc: The volume bar shouldn't be locked to the mouse cursor like LMB is still being held after clicking on it.
In case of crop: The cropping overlay should initialize after using the hotkey+LMB rather than locking it in mouse-down state.
Screenshots
uosc.mpv.net.mp4
Additional context
All of those examples work without any issues when mpv.net is in fullscreen/maximized state, so it might be connected to dragging action, but i can't be sure since
--no-window-dragging
doesn't seem to do anything in mpv.net. It might also be connected to previously reported #533 issuev6.0.4.0-stable
WIN10 21H2
The text was updated successfully, but these errors were encountered: