Skip to content
Snippets Groups Projects
Commit 70a5b446 authored by Steve Lhomme's avatar Steve Lhomme
Browse files

vout:win32: optimize the placement handling during window resizing

During fast resizing we might get a lot of WM_SIZE messages which are each
sending a CHANGE_DISPLAY_SIZE which may take time to get to the display thread.
We bypass a part of this lag by reading directly the current size of our parent
HWND (since we always place our HWND at 0,0 with the full size).

This is similar to what we have before when we handled all the HWND in this
part of the code. We read the window size directly on each size change.
parent 12c869d3
No related branches found
No related tags found
No related merge requests found
......@@ -215,6 +215,11 @@ int CommonControl(vlc_object_t *obj, display_win32_area_t *area, vout_display_sy
#if !VLC_WINSTORE_APP
if (sys->event != NULL)
{
RECT clientRect;
GetClientRect(sys->hparent, &clientRect);
area->vdcfg.display.width = RECTWidth(clientRect);
area->vdcfg.display.height = RECTHeight(clientRect);
SetWindowPos(sys->hvideownd, 0, 0, 0,
area->vdcfg.display.width,
area->vdcfg.display.height, SWP_NOZORDER|SWP_NOMOVE|SWP_NOACTIVATE);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment