[vlc-devel] [PATCH 3/3] vout:win32: remove support for hiding the cursor from the core

Rémi Denis-Courmont remi at remlab.net
Wed Aug 9 17:23:27 CEST 2017


Le 9 août 2017 15:48:11 GMT+03:00, Steve Lhomme <robux4 at videolabs.io> a écrit :
>It's now done internally and not in sync with the core anyway.
>So we don't handle VOUT_DISPLAY_HIDE_MOUSE anymore.
>---
> modules/video_output/win32/common.c     |  3 ---
> modules/video_output/win32/direct3d11.c |  1 -
> modules/video_output/win32/direct3d9.c  |  1 -
> modules/video_output/win32/directdraw.c |  1 -
> modules/video_output/win32/events.c     | 13 -------------
> modules/video_output/win32/events.h     |  1 -
> modules/video_output/win32/glwin32.c    |  1 -
> modules/video_output/win32/wingdi.c     |  1 -
> 8 files changed, 22 deletions(-)
>
>diff --git a/modules/video_output/win32/common.c
>b/modules/video_output/win32/common.c
>index 59e3411cb6..f19559379d 100644
>--- a/modules/video_output/win32/common.c
>+++ b/modules/video_output/win32/common.c
>@@ -718,9 +718,6 @@ int CommonControl(vout_display_t *vd, int query,
>va_list args)
>         return VLC_SUCCESS;
>     }
> 
>-    case VOUT_DISPLAY_HIDE_MOUSE:
>-        EventThreadMouseHide(sys->event);
>-        return VLC_SUCCESS;
>     case VOUT_DISPLAY_RESET_PICTURES:
>         vlc_assert_unreachable();
> #endif
>diff --git a/modules/video_output/win32/direct3d11.c
>b/modules/video_output/win32/direct3d11.c
>index 1ac66d6d63..e6eb867ddf 100644
>--- a/modules/video_output/win32/direct3d11.c
>+++ b/modules/video_output/win32/direct3d11.c
>@@ -540,7 +540,6 @@ static int Open(vlc_object_t *object)
>     vd->fmt = fmt;
> 
>     vd->info.has_double_click     = true;
>-    vd->info.needs_hide_mouse     = true;
>     vd->info.has_pictures_invalid = vd->info.is_slow;
> 
>     if (var_InheritBool(vd, "direct3d11-hw-blending") &&
>diff --git a/modules/video_output/win32/direct3d9.c
>b/modules/video_output/win32/direct3d9.c
>index 9da418a542..f24a0036ee 100644
>--- a/modules/video_output/win32/direct3d9.c
>+++ b/modules/video_output/win32/direct3d9.c
>@@ -271,7 +271,6 @@ static int Open(vlc_object_t *object)
>     vout_display_info_t info = vd->info;
>     info.is_slow = !is_d3d9_opaque(fmt.i_chroma);
>     info.has_double_click = true;
>-    info.needs_hide_mouse = true;
>     info.has_pictures_invalid = !is_d3d9_opaque(fmt.i_chroma);
>     if (var_InheritBool(vd, "direct3d9-hw-blending") &&
>         sys->d3dregion_format != D3DFMT_UNKNOWN &&
>diff --git a/modules/video_output/win32/directdraw.c
>b/modules/video_output/win32/directdraw.c
>index 0e6f568f64..be583127f9 100644
>--- a/modules/video_output/win32/directdraw.c
>+++ b/modules/video_output/win32/directdraw.c
>@@ -233,7 +233,6 @@ static int Open(vlc_object_t *object)
>     vout_display_info_t info = vd->info;
>     info.is_slow = true;
>     info.has_double_click = true;
>-    info.needs_hide_mouse = true;
>     info.has_pictures_invalid = true;
> 
>     /* Interaction TODO support starting with wallpaper mode */
>diff --git a/modules/video_output/win32/events.c
>b/modules/video_output/win32/events.c
>index 30fe3f7b49..7608007692 100644
>--- a/modules/video_output/win32/events.c
>+++ b/modules/video_output/win32/events.c
>@@ -48,7 +48,6 @@
>/*****************************************************************************
>  * Local prototypes.
>*****************************************************************************/
>-#define WM_VLC_HIDE_MOUSE   (WM_APP + 0)
> #define WM_VLC_CHANGE_TEXT  (WM_APP + 1)
> 
> struct event_thread_t
>@@ -234,10 +233,6 @@ static void *EventThread( void *p_this )
>         {
>             UpdateCursorMoved( p_event );
>         }
>-        else if( msg.message == WM_VLC_HIDE_MOUSE )
>-        {
>-            UpdateCursor( p_event, false );
>-        }
> 
>         /* */
>         switch( msg.message )
>@@ -266,9 +261,6 @@ static void *EventThread( void *p_this )
>         case WM_NCMOUSEMOVE:
>             break;
> 
>-        case WM_VLC_HIDE_MOUSE:
>-            break;
>-
>         case WM_LBUTTONDOWN:
>             MousePressed( p_event, msg.hwnd, MOUSE_BUTTON_LEFT );
>             break;
>@@ -407,11 +399,6 @@ static void *EventThread( void *p_this )
>     return NULL;
> }
> 
>-void EventThreadMouseHide( event_thread_t *p_event )
>-{
>-    PostMessage( p_event->hwnd, WM_VLC_HIDE_MOUSE, 0, 0 );
>-}
>-
>void EventThreadUpdateTitle( event_thread_t *p_event, const char
>*psz_fallback )
> {
>     char *psz_title = var_InheritString( p_event->vd, "video-title" );
>diff --git a/modules/video_output/win32/events.h
>b/modules/video_output/win32/events.h
>index af1414fcde..635f75c46d 100644
>--- a/modules/video_output/win32/events.h
>+++ b/modules/video_output/win32/events.h
>@@ -51,7 +51,6 @@ void            EventThreadDestroy( event_thread_t *
>);
>int             EventThreadStart( event_thread_t *, event_hwnd_t *,
>const event_cfg_t * );
> void            EventThreadStop( event_thread_t * );
> 
>-void            EventThreadMouseHide( event_thread_t * );
>void            EventThreadUpdateTitle( event_thread_t *, const char
>*psz_fallback );
> int             EventThreadGetWindowStyle( event_thread_t * );
>void            EventThreadUpdateWindowPosition( event_thread_t *, bool
>*pb_moved, bool *pb_resized,
>diff --git a/modules/video_output/win32/glwin32.c
>b/modules/video_output/win32/glwin32.c
>index c6eb15650b..601a7ddccc 100644
>--- a/modules/video_output/win32/glwin32.c
>+++ b/modules/video_output/win32/glwin32.c
>@@ -244,7 +244,6 @@ static int Open(vlc_object_t *object)
> 
>     vout_display_info_t info = vd->info;
>     info.has_double_click = true;
>-    info.needs_hide_mouse = true;
>     info.subpicture_chromas = subpicture_chromas;
> 
>    /* Setup vout_display now that everything is fine */
>diff --git a/modules/video_output/win32/wingdi.c
>b/modules/video_output/win32/wingdi.c
>index 04cfb5855c..c875422f02 100644
>--- a/modules/video_output/win32/wingdi.c
>+++ b/modules/video_output/win32/wingdi.c
>@@ -106,7 +106,6 @@ static int Open(vlc_object_t *object)
>     vout_display_info_t info = vd->info;
>     info.is_slow              = false;
>     info.has_double_click     = true;
>-    info.needs_hide_mouse     = true;
>     info.has_pictures_invalid = true;
> 
>     /* */
>-- 
>2.12.1
>
>_______________________________________________
>vlc-devel mailing list
>To unsubscribe or modify your subscription options:
>https://mailman.videolan.org/listinfo/vlc-devel

LGTM.
-- 
Rémi Denis-Courmont
Typed on an inconvenient virtual keyboard
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.videolan.org/pipermail/vlc-devel/attachments/20170809/8e4b95f5/attachment.html>


More information about the vlc-devel mailing list