[vlc-devel] [PATCH 10/11] display: always set VOUT_DISPLAY_HIDE_MOUSE if needs_hide_mouse is set
Rémi Denis-Courmont
remi at remlab.net
Tue Aug 8 17:42:53 CEST 2017
Le tiistaina 8. elokuuta 2017, 15.22.30 EEST Steve Lhomme a écrit :
> That means the vout will handle the mouse hiding on top of the GUI.
>
> Fix #17819
> ---
> src/video_output/display.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/src/video_output/display.c b/src/video_output/display.c
> index 1925e2691d..d85079cf39 100644
> --- a/src/video_output/display.c
> +++ b/src/video_output/display.c
> @@ -756,8 +756,8 @@ bool vout_ManageDisplay(vout_display_t *vd, bool
> allow_reset_pictures)
>
> if (hide_mouse_changed) {
> msg_Dbg(vd, "auto %sing mouse cursor", hide_mouse?"hid":"show");
> - if (vout_HideWindowMouse(osys->vout, hide_mouse) != VLC_SUCCESS
> - && vd->info.needs_hide_mouse)
> + vout_HideWindowMouse(osys->vout, hide_mouse);
> + if (vd->info.needs_hide_mouse)
> vout_display_Control(vd, VOUT_DISPLAY_HIDE_MOUSE, hide_mouse);
> }
This does not make sense. You can´t have both the display and the window
controlling the cursor. Normally, the window does all mouse handling. But even
if a windowing system decides to do it the other way, i.e. by the display, it
can´t be done by both.
The cursor is not quantic. It can´t be in two places, it can´t have two masks
of pressed buttons and it can´t be both visible and hidden at the same time.
The core only keeps track of one mouse state.
--
雷米‧德尼-库尔蒙
https://www.remlab.net/
More information about the vlc-devel
mailing list