[vlc-devel] [PATCH 2/2] kva: fix mouse hiding

Rémi Denis-Courmont remi at remlab.net
Tue May 22 10:36:33 CEST 2018


Better remove the current thing entirely and program a timer event from the windowing system, IMHO.

Le 22 mai 2018 11:05:25 GMT+03:00, KO Myung-Hun <komh78 at gmail.com> a écrit :
>Mouse is not hidden at all because cursor_deadline is not updated to
>proper time.
>---
> modules/video_output/kva.c | 15 +++++++++------
> 1 file changed, 9 insertions(+), 6 deletions(-)
>
>diff --git a/modules/video_output/kva.c b/modules/video_output/kva.c
>index 9b5a29f097..c92a317bac 100644
>--- a/modules/video_output/kva.c
>+++ b/modules/video_output/kva.c
>@@ -1027,13 +1027,16 @@ static MRESULT EXPENTRY WndProc( HWND hwnd,
>ULONG msg, MPARAM mp1, MPARAM mp2 )
>     RECTL rcl;
>     SWP   swp;
> 
>-    if ( sys->is_mouse_hidden &&
>-         ((msg >= WM_MOUSEFIRST    && msg <= WM_MOUSELAST) ||
>-          (msg >= WM_EXTMOUSEFIRST && msg <= WM_EXTMOUSELAST) ||
>-           msg == WM_MOUSELEAVE))
>+    if ( (msg >= WM_MOUSEFIRST    && msg <= WM_MOUSELAST) ||
>+         (msg >= WM_EXTMOUSEFIRST && msg <= WM_EXTMOUSELAST) ||
>+          msg == WM_MOUSELEAVE)
>     {
>-        WinShowPointer(HWND_DESKTOP, TRUE);
>-        sys->is_mouse_hidden = false;
>+        if ( sys->is_mouse_hidden )
>+        {
>+            WinShowPointer(HWND_DESKTOP, TRUE);
>+            sys->is_mouse_hidden = false;
>+        }
>+
>         sys->cursor_deadline = mdate() + sys->cursor_timeout;
>     }
> 
>-- 
>2.13.3
>
>_______________________________________________
>vlc-devel mailing list
>To unsubscribe or modify your subscription options:
>https://mailman.videolan.org/listinfo/vlc-devel

-- 
Envoyé de mon appareil Android avec Courriel K-9 Mail. Veuillez excuser ma brièveté.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.videolan.org/pipermail/vlc-devel/attachments/20180522/f067e472/attachment.html>


More information about the vlc-devel mailing list