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鈥檒l occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Mouse Support] Track position slider is also activated without initial press #920
Comments
Yeah, can reproduce this for sure. Not really certain yet how to tackle that. The |
Yes, I thought about that as well. The only other option I saw with the current implementation was to capture all mouse events after a press in the status bar, and to release them when any release event occurs. I don't know if it's possible to do that, and if it's possible, I don't know what would happen when a release happens outside the window. As a quick solution, I think seeking with press only would be ok, as it's way more inconvenient when seeking is activated by accident... |
I think one problem in the existing implementation is here: Lines 292 to 343 in 816d2f1
The events are passed to the statusbar before the inner view in the layout (i.e. |
Went for the quick fix now, the loss in functionality very little and the bug is way more annoying 馃槃 |
Describe the bug
Yet another small problem with the mouse support (sorry 馃槃 ): When dragging the scroller on the right side, it's possible to drag the mouse onto the track position slider by accident, which causes it to jump to the position where it was entered with the mouse. This isn't a major bug of course, but just something small that could be fixed as it's probably not intended and sad when you were just listening to "that one good song with the nice drop" and you skip to the end by accident 馃槈 ...
To Reproduce
Steps to reproduce the behavior:
MouseEvent::Hold(MouseButton::Press)
, but you'd never trigger it by accident without scrolling);Expected behavior
The statusbar should grab all mouse input when it has been clicked, and should not react to
MouseEvent::Hold
directly, until the mouse is released again anywhere on the screen. That way, it would only be possible to scroll on the statusbar when it is actually the intention of the user to do so.I tried implementing this behavior using a
result EventResult::Consumed(Some(Callback::on_*_fn))
after the statusbar was pressed, and usingcursive::set_global_callback
orcursive::set_on_{pre,post}_event
to capture all the mouse events, but couldn't get it to work.System (please complete the following information):
The text was updated successfully, but these errors were encountered: