[vlc-commits] vout:win32: do not enable the main HWND either

Steve Lhomme git at videolan.org
Sat Apr 6 16:40:31 CEST 2019


vlc | branch: master | Steve Lhomme <robux4 at ycbcr.xyz> | Sat Apr  6 16:36:55 2019 +0200| [830131878d1ab297082a759240b77f1bce46d040] | committer: Steve Lhomme

vout:win32: do not enable the main HWND either

We don't want to handle mouse and keyboard events, just the gestures which seem
to be independent of that flag.

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=830131878d1ab297082a759240b77f1bce46d040
---

 modules/video_output/win32/events.c | 30 +-----------------------------
 1 file changed, 1 insertion(+), 29 deletions(-)

diff --git a/modules/video_output/win32/events.c b/modules/video_output/win32/events.c
index e44086ae39..edfcea5205 100644
--- a/modules/video_output/win32/events.c
+++ b/modules/video_output/win32/events.c
@@ -82,19 +82,6 @@ static int  Win32VoutCreateWindow( event_thread_t * );
 static void Win32VoutCloseWindow ( event_thread_t * );
 static long FAR PASCAL WinVoutEventProc( HWND, UINT, WPARAM, LPARAM );
 
-/* Local helpers */
-static inline bool isMouseEvent( WPARAM type )
-{
-    return type >= WM_MOUSEFIRST &&
-           type <= WM_MOUSELAST;
-}
-
-static inline bool isNonClientMouseEvent( WPARAM type )
-{
-    return type >= WM_NCMOUSEMOVE &&
-           type <= WM_NCXBUTTONDBLCLK;
-}
-
 /*****************************************************************************
  * EventThread: Create video window & handle its messages
  *****************************************************************************
@@ -359,12 +346,7 @@ static int Win32VoutCreateWindow( event_thread_t *p_event )
         return VLC_EGENERIC;
     }
 
-    i_style = WS_VISIBLE|WS_CLIPCHILDREN|WS_CHILD;
-
-    /* allow user to regain control over input events if requested */
-    bool b_mouse_support = var_InheritBool( p_event->obj, "mouse-events" );
-    if( !b_mouse_support )
-        i_style |= WS_DISABLED;
+    i_style = WS_VISIBLE|WS_CLIPCHILDREN|WS_CHILD|WS_DISABLED;
 
     /* Create the window */
     p_event->hwnd =
@@ -454,16 +436,6 @@ static long FAR PASCAL WinVoutEventProc( HWND hwnd, UINT message,
         return DefWindowProc(hwnd, message, wParam, lParam);
     event_thread_t *p_event = (event_thread_t *)p_user_data;
 
-    if ( isMouseEvent( message ) || isNonClientMouseEvent( message ))
-    {
-        /* forward to the parent */
-        POINT mouse_pos = *(POINT*)(&lParam);
-        MapWindowPoints(hwnd, GetParent(hwnd), &mouse_pos, 1);
-        LPARAM translatedParam = MAKELONG(mouse_pos.x, mouse_pos.y);
-        PostMessage(GetParent(hwnd), message, wParam, translatedParam);
-        return 0; /* pretend we didn't handle it */
-    }
-
     switch( message )
     {
     /* the user wants to close the window */



More information about the vlc-commits mailing list