Re: [FFmpeg-devel] [PATCH 1/2] ffplay: Seek only when pressing the right mouse button on the video window.
Hi, On 16/01/2016 21:13:14 CET, Marton Balint wrote: On Fri, 15 Jan 2016, Vittorio Gambaletta (VittGam) wrote: 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: Vittorio Gambaletta Looks good, I will apply in a few days if no one steps up against it. However your patch seem to have some whitespace errors probably caused by your mailer, and because of that it does not apply cleanly so you might consider sending patches next time as an attachment if your mailer messes something up inline. Thank you for your suggestion, I thought I finally fixed that problem with my mailer while in fact I failed again... Cheers, Vittorio ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
Re: [FFmpeg-devel] [PATCH 1/2] ffplay: Seek only when pressing the right mouse button on the video window.
On Fri, 15 Jan 2016, Vittorio Gambaletta (VittGam) wrote: 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: Vittorio Gambaletta Looks good, I will apply in a few days if no one steps up against it. However your patch seem to have some whitespace errors probably caused by your mailer, and because of that it does not apply cleanly so you might consider sending patches next time as an attachment if your mailer messes something up inline. Regards, Marton ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
[FFmpeg-devel] [PATCH 1/2] 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: Vittorio Gambaletta --- ffplay.c |4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/ffplay.c b/ffplay.c index d2e3dc6..2fa7165 100644 --- a/ffplay.c +++ b/ffplay.c @@ -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; } ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel