Commit cde4b99f authored by Vittorio Gambaletta (VittGam)'s avatar Vittorio Gambaletta (VittGam) Committed by Marton Balint

ffplay: seek only when pressing the right mouse button on the video window

Seeking by clicking on the video window can be annoying, because
the user might click on it accidentally while eg. trying to get
focus on it, and ffplay seeks instead.

This commit changes that behaviour to seek only when the right
mouse button is used to click and drag on the window.
Signed-off-by: 's avatarVittorio Gambaletta <ffmpeg-dev@vittgam.net>
Signed-off-by: 's avatarMarton Balint <cus@passwd.hu>
parent 307b8482
......@@ -54,6 +54,7 @@ version <next>:
- libstagefright support removed
- spectrumsynth filter
- ahistogram filter
- only seek with the right mouse button in ffplay
version 2.8:
......
......@@ -3480,9 +3480,11 @@ static void event_loop(VideoState *cur_stream)
}
cursor_last_shown = av_gettime_relative();
if (event.type == SDL_MOUSEBUTTONDOWN) {
if (event.button.button != SDL_BUTTON_RIGHT)
break;
x = event.button.x;
} else {
if (event.motion.state != SDL_PRESSED)
if (!(event.motion.state & SDL_BUTTON_RMASK))
break;
x = event.motion.x;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment