[vlc-devel] [PATCH] vout:win32: use the event HWND directly with IDM_TOGGLE_ON_TOP

Steve Lhomme robux4 at ycbcr.xyz
Fri Mar 22 11:46:41 CET 2019


vd->sys->hwnd comes from p_event->hwnd through EventThreadStart() and is never
modified afterwards.
---
 modules/video_output/win32/events.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/modules/video_output/win32/events.c b/modules/video_output/win32/events.c
index 943efa8537..1edcf09d52 100644
--- a/modules/video_output/win32/events.c
+++ b/modules/video_output/win32/events.c
@@ -992,7 +992,7 @@ static long FAR PASCAL WinVoutEventProc( HWND hwnd, UINT message,
         case IDM_TOGGLE_ON_TOP:            /* toggle the "on top" status */
         {
             msg_Dbg(vd, "WinProc WM_SYSCOMMAND: IDM_TOGGLE_ON_TOP");
-            HMENU hMenu = GetSystemMenu(vd->sys->hwnd, FALSE);
+            HMENU hMenu = GetSystemMenu(p_event->hwnd, FALSE);
             vout_display_SendWindowState(vd, (GetMenuState(hMenu, IDM_TOGGLE_ON_TOP, MF_BYCOMMAND) & MF_CHECKED) ?
                     VOUT_WINDOW_STATE_NORMAL : VOUT_WINDOW_STATE_ABOVE);
             return 0;
-- 
2.17.1



More information about the vlc-devel mailing list