Commit e3a92482 authored by Daniel Amm's avatar Daniel Amm Committed by Jean-Baptiste Kempf

Correctly update UI after media change

Close #14660
parent 7ab878db
......@@ -566,11 +566,17 @@ LRESULT VLCHolderWnd::WindowProc(UINT uMsg, WPARAM wParam, LPARAM lParam)
DWORD s = GetWindowLong(hwnd, GWL_STYLE);
s |= WS_CLIPSIBLINGS;
SetWindowLong(hwnd, GWL_STYLE, s);
// Now we can hook onto the media player's HWND:
MouseHook(true);
//libvlc events arrives from separate thread,
//so we need post message to main thread, to notify it.
PostMessage(hWnd(), WM_SET_MOUSE_HOOK, 0, 0);
});
break;
}
case WM_SET_MOUSE_HOOK:{
MouseHook(true);
break;
}
case WM_PAINT:{
PAINTSTRUCT PaintStruct;
HDC hDC = BeginPaint(hWnd(), &PaintStruct);
......
......@@ -33,6 +33,7 @@
enum{
WM_MOUSE_EVENT_NOTIFY = WM_APP + 1,
WM_MOUSE_EVENT_REPOST,
WM_SET_MOUSE_HOOK,
WM_MOUSE_EVENT_NOTIFY_SUCCESS = 0xFF
};
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment