Mouse Cursor sometimes goes invisble when opening file while window is open
Hello!
It would seem that if you open a file, while the VLC window is open and playing a video, the mouse cursor intermittently goes invisible for a period of time in the newly opened window. Whether from "Open Media"-dialog or when clicking on files from your Windows Manager doesn't matter, but it would seem to be related to your mouse cursors state in the open window, since it usually requires a few seconds to elapse before opening a new file (I guess from the mouse hiding in the already opened window) before it will be invisible when opening a new window.
My system: Debian 12 6.1.0-1-amd64 x86_64 GNU/Linux VLC media player 3.0.18 Vetinari (revision 3.0.13-8-g41878ff4)
I did some digging and could see that the "osys->mouse.is_hidden" variable was set to False, while the actual cursor was hidden in the newly opened window. I was able to fix the issue locally by adding these lines to src/video_output/display.c:1152 in the DisplayNew function.
I.e. when osys is initialized, set state of mouse to not hidden and make sure the window has the same state.
Since this is the first time I've even looked at the VLC source code I'll leave it up to the VLC developers if this would be an acceptable fix or if there's better ways to solve this issue.
Also: While debugging this I saw that the "osys->mouse.last_moved" never got updated if a dialog was opened, for example opening "Media -> Open Directory", so it would seem the new dialog yanks the mouse events from the video window - might be the cause of #27141
Have a good day!
