VLC4 video filter: mouse filtering is ignored by the video window / GUI
In earlier VLC versions (at least 3, 2.2 and 2.1), mouse filtering affected the GUI. This is not the case with VLC4.
For example, you could filter out the double click by setting it to zero:
if (p_mouse->b_double_click == 1) {
p_mouse->b_double_click = 0;
}
which would prevent the GUI from going full-screen.
Or, you could trigger full-screen when the mouse wheel is clicked:
if (vlc_mouse_IsPressed(p_mouse_i_pressed, MOUSE_BUTTON_CENTER)) {
p_mouse->b_double_click = 1;
}
Similar with the context menu -- you could catch MOUSE_BUTTON_RIGHT
and unset it, to prevent the context menu from appearing. Or set it on MOUSE_BUTTON_CENTER
, so that the context menu would appear whenever a user clicks on the mouse wheel.
This doesn't seem to be possible in VLC4.
This should prevent GUI from going full-screen, yet the GUI still goes full-screen:
static int mouse(filter_t *p_filter, vlc_mouse_t *p_mouse_new_out, const vlc_mouse_t *p_mouse_old)
{
p_mouse_new_out->b_double_click = 0;
return VLC_SUCCESS;
}
Even the video window code suggests that the above should work, the mouse is being filtered before deciding whether to full-screen, but somehow the filtering doesn't work?:
Also, about that code, it doesn't seem like the context menu being triggered on right-click logic is in there? That should be mouse-filtered too...