[vlc-commits] [Git][videolan/vlc][3.0.x] vout: pass non-left-mouse-button double-clicks
Steve Lhomme (@robUx4)
gitlab at videolan.org
Wed Oct 18 05:48:55 UTC 2023
Steve Lhomme pushed to branch 3.0.x at VideoLAN / VLC
Commits:
ed22580d by Maxim Biro at 2023-10-18T05:31:57+00:00
vout: pass non-left-mouse-button double-clicks
This fixes #28377 -- the issue when double-clicking on
MOUSE_BUTTON_CENTER (mouse wheel) would result in plugins receiving
mouse events only for the first click, as VLC was filtering out all
non-left-mouse-button double-clicks.
The non-left-mouse-button double-click events, instead of being entirely
filtered out, are now being passed as regular mouse button presses
without any indication that they are double-clicks. While it would be
more proper to pass them as double-clicks with the corresponding mouse
button being pressed, that might break some 3rd party plugins that rely
on (vlc_mouse_t.b_double_click == true) to mean that the left mouse
button was double-clicked, without checking if the left mouse button was
actually pressed. Still, even with b_double_click not being set on
non-left-mouse-button double-clicks, passing such double-clicks as
regular press+release events does fix the issue of VLC "eating up" the
second click of a MOUSE_BUTTON_CENTER, so this is a good change.
- - - - -
1 changed file:
- src/video_output/video_output.c
Changes:
=====================================
src/video_output/video_output.c
=====================================
@@ -1427,6 +1427,8 @@ static void ThreadChangeWindowMouse(vout_thread_t *vout,
case VOUT_WINDOW_MOUSE_DOUBLE_CLICK:
if (mouse->button_mask == 0)
vout_display_SendEventMouseDoubleClick(vd);
+ else
+ vout_display_SendEventMousePressed(vd, mouse->button_mask);
break;
default: vlc_assert_unreachable();
break;
View it on GitLab: https://code.videolan.org/videolan/vlc/-/commit/ed22580d6f312bfb13a3fcf1cfd01206c7159f2b
--
View it on GitLab: https://code.videolan.org/videolan/vlc/-/commit/ed22580d6f312bfb13a3fcf1cfd01206c7159f2b
You're receiving this email because of your account on code.videolan.org.
VideoLAN code repository instance
More information about the vlc-commits
mailing list