[vlc-devel] [PATCH 06/11] kva: handle the flag in VOUT_DISPLAY_HIDE_MOUSE

Steve Lhomme robux4 at videolabs.io
Tue Aug 8 15:22:26 CEST 2017


---
 modules/video_output/kva.c | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/modules/video_output/kva.c b/modules/video_output/kva.c
index dbd2a737ed..f181e70f35 100644
--- a/modules/video_output/kva.c
+++ b/modules/video_output/kva.c
@@ -419,13 +419,14 @@ static int Control( vout_display_t *vd, int query, va_list args )
     case VOUT_DISPLAY_HIDE_MOUSE:
     {
         POINTL ptl;
+        bool hide = va_arg(args, int);
 
         WinQueryPointerPos( HWND_DESKTOP, &ptl );
-        if( !sys->is_mouse_hidden &&
+        if( sys->is_mouse_hidden != hide &&
             WinWindowFromPoint( HWND_DESKTOP, &ptl, TRUE ) == sys->client )
         {
-            WinShowPointer( HWND_DESKTOP, FALSE );
-            sys->is_mouse_hidden = true;
+            WinShowPointer( HWND_DESKTOP, hide ? TRUE : FALSE );
+            sys->is_mouse_hidden = hide;
         }
 
         return VLC_SUCCESS;
-- 
2.12.1



More information about the vlc-devel mailing list