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

Steve Lhomme git at videolan.org
Fri Mar 29 15:47:17 CET 2019


vlc | branch: master | Steve Lhomme <robux4 at ycbcr.xyz> | Thu Mar 21 16:51:56 2019 +0100| [ed002113c77b5b063cc6f6fb8401ea956fb703ec] | committer: Steve Lhomme

vout:win32: use the event HWND directly with IDM_TOGGLE_ON_TOP

vd->sys->hwnd comes from p_event->hwnd through EventThreadStart() and is never
modified afterwards.

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

 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;



More information about the vlc-commits mailing list