winrt: Fix frozen UI caused by camera search and lock focus.

Instead of yielding thread process events while waiting for focus to
complete.

Change-Id: I6b5f08bc175af37430c851f151fce5c3bfe238ad
Task-Id: QTBUG-48534
Reviewed-by: Andrew Knight <andrew.knight@intopalo.com>
This commit is contained in:
Samuel Nevala
2015-10-01 18:54:42 +03:00
parent 12512d557f
commit c5ebfb0c19

View File

@@ -1118,7 +1118,7 @@ bool QWinRTCameraControl::focus()
ComPtr<IAsyncAction> op;
HRESULT hr = d->focusControl->FocusAsync(&op);
Q_ASSERT_SUCCEEDED(hr);
hr = QWinRTFunctions::await(op);
hr = QWinRTFunctions::await(op, QWinRTFunctions::ProcessThreadEvents);
Q_ASSERT_SUCCEEDED(hr);
return hr == S_OK;
}