Commit d3463d16 authored by Marcus Meissner's avatar Marcus Meissner Committed by Alexandre Julliard

ReleaseCapture should return TRUE.

parent 9c63540d
......@@ -183,7 +183,19 @@ HWND WINAPI SetCapture( HWND hwnd )
*/
BOOL WINAPI ReleaseCapture(void)
{
return (SetCapture(0) != 0);
BOOL ret;
HWND previous = 0;
SERVER_START_REQ( set_capture_window )
{
req->handle = 0;
req->flags = 0;
if ((ret = !wine_server_call_err( req ))) previous = reply->previous;
}
SERVER_END_REQ;
if (previous) SendMessageW( previous, WM_CAPTURECHANGED, 0, 0 );
return ret;
}
......
......@@ -2173,6 +2173,8 @@ static void test_capture_2(void)
static void test_capture_3(HWND hwnd1, HWND hwnd2)
{
BOOL ret;
ShowWindow(hwnd1, SW_HIDE);
ShowWindow(hwnd2, SW_HIDE);
......@@ -2188,7 +2190,10 @@ static void test_capture_3(HWND hwnd1, HWND hwnd2)
ShowWindow(hwnd1, SW_SHOW);
check_wnd_state(hwnd1, hwnd1, hwnd1, hwnd2);
ReleaseCapture();
ret = ReleaseCapture();
ok (ret, "releasecapture did not return TRUE.\n");
ret = ReleaseCapture();
ok (ret, "releasecapture did not return TRUE after second try.\n");
}
static void test_keyboard_input(HWND hwnd)
......
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