Commit 70a5b446 authored by Steve Lhomme's avatar Steve Lhomme

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
......@@ -215,6 +215,11 @@ int CommonControl(vlc_object_t *obj, display_win32_area_t *area, vout_display_sy
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.height, SWP_NOZORDER|SWP_NOMOVE|SWP_NOACTIVATE);
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