strmbase: Do not activate the window when changing its position.

Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=10440
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Zebediah Figura 2019-10-07 18:55:46 -05:00 committed by Alexandre Julliard
parent 9b98246e82
commit 47ec8ce911
2 changed files with 11 additions and 7 deletions

View file

@ -1762,9 +1762,9 @@ static void test_video_window_position(IVideoWindow *window, HWND hwnd, HWND our
ok(rect.right == 400, "Got window right %d.\n", rect.right);
ok(rect.bottom == 600, "Got window bottom %d.\n", rect.bottom);
todo_wine ok(GetActiveWindow() == our_hwnd, "Got active window %p.\n", GetActiveWindow());
ok(GetActiveWindow() == our_hwnd, "Got active window %p.\n", GetActiveWindow());
top_hwnd = get_top_window();
todo_wine ok(top_hwnd == our_hwnd, "Got top window %p.\n", top_hwnd);
ok(top_hwnd == our_hwnd, "Got top window %p.\n", top_hwnd);
}
static void test_video_window_owner(IVideoWindow *window, HWND hwnd, HWND our_hwnd)

View file

@ -462,7 +462,8 @@ HRESULT WINAPI BaseControlWindowImpl_put_Left(IVideoWindow *iface, LONG Left)
TRACE("(%p/%p)->(%d)\n", This, iface, Left);
GetWindowRect(This->baseWindow.hWnd, &WindowPos);
if (!SetWindowPos(This->baseWindow.hWnd, NULL, Left, WindowPos.top, 0, 0, SWP_NOZORDER|SWP_NOSIZE))
if (!SetWindowPos(This->baseWindow.hWnd, NULL, Left, WindowPos.top, 0, 0,
SWP_NOACTIVATE | SWP_NOZORDER | SWP_NOSIZE))
return E_FAIL;
return S_OK;
@ -487,7 +488,8 @@ HRESULT WINAPI BaseControlWindowImpl_put_Width(IVideoWindow *iface, LONG Width)
TRACE("(%p/%p)->(%d)\n", This, iface, Width);
if (!SetWindowPos(This->baseWindow.hWnd, NULL, 0, 0, Width, This->baseWindow.Height, SWP_NOZORDER|SWP_NOMOVE))
if (!SetWindowPos(This->baseWindow.hWnd, NULL, 0, 0, Width, This->baseWindow.Height,
SWP_NOACTIVATE | SWP_NOZORDER | SWP_NOMOVE))
return E_FAIL;
This->baseWindow.Width = Width;
@ -514,7 +516,8 @@ HRESULT WINAPI BaseControlWindowImpl_put_Top(IVideoWindow *iface, LONG Top)
TRACE("(%p/%p)->(%d)\n", This, iface, Top);
GetWindowRect(This->baseWindow.hWnd, &WindowPos);
if (!SetWindowPos(This->baseWindow.hWnd, NULL, WindowPos.left, Top, 0, 0, SWP_NOZORDER|SWP_NOSIZE))
if (!SetWindowPos(This->baseWindow.hWnd, NULL, WindowPos.left, Top, 0, 0,
SWP_NOACTIVATE | SWP_NOZORDER | SWP_NOSIZE))
return E_FAIL;
return S_OK;
@ -539,7 +542,8 @@ HRESULT WINAPI BaseControlWindowImpl_put_Height(IVideoWindow *iface, LONG Height
TRACE("(%p/%p)->(%d)\n", This, iface, Height);
if (!SetWindowPos(This->baseWindow.hWnd, NULL, 0, 0, This->baseWindow.Width, Height, SWP_NOZORDER|SWP_NOMOVE))
if (!SetWindowPos(This->baseWindow.hWnd, NULL, 0, 0, This->baseWindow.Width,
Height, SWP_NOACTIVATE | SWP_NOZORDER | SWP_NOMOVE))
return E_FAIL;
This->baseWindow.Height = Height;
@ -675,7 +679,7 @@ HRESULT WINAPI BaseControlWindowImpl_SetWindowPosition(IVideoWindow *iface, LONG
TRACE("(%p/%p)->(%d, %d, %d, %d)\n", This, iface, Left, Top, Width, Height);
if (!SetWindowPos(This->baseWindow.hWnd, NULL, Left, Top, Width, Height, SWP_NOZORDER))
if (!SetWindowPos(This->baseWindow.hWnd, NULL, Left, Top, Width, Height, SWP_NOACTIVATE | SWP_NOZORDER))
return E_FAIL;
This->baseWindow.Width = Width;