ReleaseCapture should return TRUE.
This commit is contained in:
parent
9c63540d55
commit
d3463d169b
|
@ -183,7 +183,19 @@ HWND WINAPI SetCapture( HWND hwnd )
|
||||||
*/
|
*/
|
||||||
BOOL WINAPI ReleaseCapture(void)
|
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)
|
static void test_capture_3(HWND hwnd1, HWND hwnd2)
|
||||||
{
|
{
|
||||||
|
BOOL ret;
|
||||||
|
|
||||||
ShowWindow(hwnd1, SW_HIDE);
|
ShowWindow(hwnd1, SW_HIDE);
|
||||||
ShowWindow(hwnd2, SW_HIDE);
|
ShowWindow(hwnd2, SW_HIDE);
|
||||||
|
|
||||||
|
@ -2188,7 +2190,10 @@ static void test_capture_3(HWND hwnd1, HWND hwnd2)
|
||||||
ShowWindow(hwnd1, SW_SHOW);
|
ShowWindow(hwnd1, SW_SHOW);
|
||||||
check_wnd_state(hwnd1, hwnd1, hwnd1, hwnd2);
|
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)
|
static void test_keyboard_input(HWND hwnd)
|
||||||
|
|
Loading…
Reference in New Issue