[vlc-devel] [PATCH] window: add an API to show or hide the cursor over the window
Rémi Denis-Courmont
remi at remlab.net
Fri Apr 5 16:03:50 CEST 2019
Le vendredi 5 avril 2019, 10:34:16 EEST Steve Lhomme a écrit :
> On 4/5/2019 8:38 AM, Rémi Denis-Courmont wrote:
> > This was removed on purpose for reasons already outlined. I don't
> > think it should be added back.
>
> OK, I think you're referring to https://trac.videolan.org/vlc/ticket/18661
>
> I don't like duplicated (many times) code but in this case it kinda
> makes sense.
Most of the code is intrinsically backend-specific. The only "duplicated"
functionality is the hide timer.
> Showing the mouse has to be done ASAP when the mouse starts
> moving again.
There never was a control to show the mouse. Modules are not reentrant - so
"show mouse" callback could not be called from within the mouse movement event
handler.
> I'm not sure the delay going through the core is that big
> though. When the mouse moves or buttons are clicked the vout_window_t
> reports it (to the core). This is done synchronously. In would call
> vout_window_ShowCursor(true) right away, also synchronously. This is
> exactly the same as when it's handled internally.
There are no threads in the window "core" to run the timer in. It would be way
overkill to add a timer thread just to hide the cursor, considering that all
window providers either have their own thread and/or a UI mainloop, which they
can schedule timers on.
--
Rémi Denis-Courmont
More information about the vlc-devel
mailing list